Re: BUG #14038: substring cuts unicode char in half, allowing to save broken utf8 into table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #14038: substring cuts unicode char in half, allowing to save broken utf8 into table
Дата
Msg-id 22852.1458578790@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #14038: substring cuts unicode char in half, allowing to save broken utf8 into table  (rpegues@tripwire.com)
Ответы Re: BUG #14038: substring cuts unicode char in half, allowing to save broken utf8 into table  (Reece Pegues <RPegues@tripwire.com>)
Список pgsql-bugs
rpegues@tripwire.com writes:
> We have a table with an update trigger where if you modify a certain column,
> we change the name of the row by calling a function.
> In the function, substring() the name and then add a random string to that.
> However, the substring appears to cut a unicode character in half, and the
> update trigger then updates the name with the broken string.

That should not happen if Postgres knows it's dealing with unicode data.
What have you got the database's encoding set to?

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #14033: cross-compilation to ARM fails
Следующее
От: Reece Pegues
Дата:
Сообщение: Re: BUG #14038: substring cuts unicode char in half, allowing to save broken utf8 into table