"CN" <cnliou9 (AT) fastmail (DOT) fmwrites:
The database cluster is initialized to use UNICDE. The client encoding
is set to BIG5. The middleware escapes the backslash in the following
string before writing to TEXT/VARCHAR column in server:
a5 5c af e0
Seems to me that you need to fix your broken middleware it has no
business doing that.
This is a string comprises Big5 characters each of 2 octets big. Note
that the second octets, 5c, of the first Big5 character clashes
backslash '\'. Thus, this string is escaped to
a5 5c 31 33 34 af e0
Now you have a 2-octet Big5 character, followed by 3 1-octet ASCII
digits, followed by a 2-octet Big5 character. All the subsequent
processing is doing what it should with this, AFAICS.
regards, tom lane
(end of broadcast)
TIP 4: Have you searched our list archives?
http://archives.postgresql.org