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:
> INSERT INTO y VALUES ('y\134na');
> --"y\" and "na" are two Big5 characters.

I'm not sure how to explain it any more clearly: the backslash in this
example is not a backslash.  It's a byte within a multibyte character,
which *entirely coincidentally* happens to have the same numeric value
as an ASCII backslash.  But it isn't a backslash.  And it won't be
processed as a backslash by any Big5-aware code.

Code that does not understand about multibyte characters is simply
unsafe to apply to data that is in Big5.  You need to fix that
middleware to understand Big5 encoding; or if that seems impractical,
switch to using another encoding for the data the middleware sees.

			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