Re: Escaped backslash in SQL constant

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Escaped backslash in SQL constant
Дата
Msg-id 12050.1135395661@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Escaped backslash in SQL constant  ("CN" <cnliou9@fastmail.fm>)
Ответы Re: Escaped backslash in SQL constant  ("CN" <cnliou9@fastmail.fm>)
Список pgsql-general
"CN" <cnliou9@fastmail.fm> writes:
>> Seems to me that you need to fix your broken middleware --- it has no
>> business doing that.

> Are you suggesting that the middleware should not escape backslashes in
> the first place?

No, I'm suggesting that it shouldn't be let loose on Big5 data when it
evidently hasn't a clue about that encoding.  The byte in question
*is not* a backslash, it's not even an independent character; and so
changing it on the assumption that it is logically a backslash simply
breaks the data.

Your quickest route to a solution may be to avoid Big5 in favor of
an encoding that is ASCII-safe, such as UTF8.  You can feed that through
code that only understands ASCII with much less risk than an encoding
where second and later bytes might look like ASCII.

            regards, tom lane

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

Предыдущее
От: "CN"
Дата:
Сообщение: Re: Escaped backslash in SQL constant
Следующее
От: "CN"
Дата:
Сообщение: Re: Escaped backslash in SQL constant