Re: UTF-8 encoding problem

Поиск
Список
Период
Сортировка
От bhyuan
Тема Re: UTF-8 encoding problem
Дата
Msg-id 20070816214048.9A0B.BHYUAN@gmail.com
обсуждение исходный текст
Ответ на Re: UTF-8 encoding problem  (Peter Eisentraut <peter_e@gmx.net>)
Ответы Re: UTF-8 encoding problem
Список pgsql-general
Thanks for your  replay.

Maybe SQL injection-like security issues will occour,
but I find that differend version of Postgresql get different result.

Such as the sql
set client_encoding='SJIS';
select '\xc3\xaa',* from xxx;

on V7.4 @RH3 got
\xc3\xaa

on V8.1.2@RH4 got
    (blank)

on V8.1.4@FreeBSD6 got
ERROR:  character 0xc3aa of encoding "UTF8" has no equivalent in "SJIS"

AND
Version 8.1
http://www.postgresql.org/docs/8.1/interactive/multibyte.html#AEN22591
------------------------------
If the conversion of a particular character is not possible -- suppose you chose EUC_JP for the server and LATIN1 for
theclient, then some Japanese characters do not have a representation in LATIN1 -- then an error is reported.  
------------------------------

Version 7.4
http://www.postgresql.org/docs/7.4/interactive/multibyte.html#AEN18371
------------------------------
If the conversion of a particular character is not possible -- suppose you chose EUC_JP for the server and LATIN1 for
theclient, then some Japanese characters cannot be converted to LATIN1 -- it is transformed to its hexadecimal byte
valuesin parentheses, e.g., (826C).  


I got confused, I just want to get the right sql result enen some character was
not encoded corrctlly.
Just like  V8.1.2@RH4  the not right character was ignored.
....


On Thu, 16 Aug 2007 11:03:39 +0200
Peter Eisentraut <peter_e@gmx.net> wrote:

> Am Donnerstag, 16. August 2007 08:40 schrieb bhyuan:
> > Can I ignore the error message by confiing the config file?
>
> No, there are not provisions for that.  Some errors of this type used to be
> ignored, but that led to SQL injection-like security issues, so you don't
> want that.
>
> --
> Peter Eisentraut
> http://developer.postgresql.org/~petere/
--
bhyuan <bhyuan@gmail.com>


В списке pgsql-general по дате отправления:

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: Accessing tables in other databases, through functions
Следующее
От: "James B. Byrne"
Дата:
Сообщение: UTF-8 encoding