Re: encoding confusion - Mailing list pgsql-general

From Richard Huxton
Subject Re: encoding confusion
Date
Msg-id 484F78C6.7060804@archonet.com
Whole thread Raw
In response to Re: encoding confusion  (Sim Zacks <sim@compulab.co.il>)
Responses Re: encoding confusion  (Alban Hertroys <dalroi@solfertje.student.utwente.nl>)
List pgsql-general
Sim Zacks wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> The data in the longblob field might be text, which could be causing the
> confusion. For example, when I look at the data in the longblob field, I
> see /n for a newline and when I look at the bytea it is 012.

That's right - newline is ASCII 10 (or 12 in octal).

> I can only tell you what happened in the client end, in terms of
> corruption. I am using the Thunderbord client. When I clicked on a
> message, it didn't show the data and when I looked at the headers, it
> was just a big mess. I'm guessing that somehow the newlines didn't work
> and the headers and message were overlaid on top of each other.

Well that might be a problem with dmail's setup rather than the
database. I think headers are restricted to ASCII only (the body is a
different matter). The best bet is to be certain whether the database is
to blame.

Find a problem entry, dump that one row to a file from MySQL, do the
same from PostgreSQL and also from the midpoint in your Python code
doing the transfer. Then use a hex editor / dumper (e.g. "hexdump -C" on
linux) to see what bytes differ in the files.

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Sim Zacks
Date:
Subject: Re: encoding confusion
Next
From: Richard Huxton
Date:
Subject: Re: what gives: SELECT INVALID SELECT STATEMENT TO FORCE ODBC DRIVER TO UNPREPARED STATE