Search Postgresql Archives

Re: Escaped backslash in SQL constant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"CN" <cnliou9@xxxxxxxxxxx> writes:
> The database cluster is initialized to use UNICODE. 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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux