Re: Encoding conversion: Use replacement character instead of failing query with "ERROR: character with byte sequence 0xd0 0xad in encoding "UTF8" has no equivalent in encoding LATIN1" ?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Encoding conversion: Use replacement character instead of failing query with "ERROR: character with byte sequence 0xd0 0xad in encoding "UTF8" has no equivalent in encoding LATIN1" ?
Дата
Msg-id 1791.1588723247@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Encoding conversion: Use replacement character instead of failingquery with "ERROR: character with byte sequence 0xd0 0xad in encoding "UTF8"has no equivalent in encoding LATIN1" ?  (Christian Ramseyer <rc@networkz.ch>)
Ответы Re: Encoding conversion: Use replacement character instead of failingquery with "ERROR: character with byte sequence 0xd0 0xad in encoding "UTF8"has no equivalent in encoding LATIN1" ?
Список pgsql-general
Christian Ramseyer <rc@networkz.ch> writes:
> Can I somehow influence the client:UTF8->server:LATIN1 character set
> conversion so that instead of failing, it inserts an invalid codepoint
> character, the utf8 hex bytes as string, drops the character or
> something like that?

There's nothing built-in for that, but it seems like it wouldn't be
hard to modify the code if you wanted a quick hack to do this.

In general, the system nominally supports multiple conversion functions
per encoding pair, so you could imagine having an alternate conversion
that doesn't throw errors.  Problem is that it's quite difficult to get
the system to actually *use* a non-default conversion for anything really
significant, like say client I/O.  I don't know that anyone's thought
hard about how to improve that.

            regards, tom lane



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

Предыдущее
От: Tim Cross
Дата:
Сообщение: Re: Lock Postgres account after X number of failed logins?
Следующее
От: Virendra Kumar
Дата:
Сообщение: Wrong PostgreSQL Plan