Re: proposal: UTF8 to_ascii function

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: proposal: UTF8 to_ascii function
Дата
Msg-id 48A03BE8.6060004@dunslane.net
обсуждение исходный текст
Ответ на Re: proposal: UTF8 to_ascii function  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Ответы Re: proposal: UTF8 to_ascii function  (Jan Urbański <j.urbanski@students.mimuw.edu.pl>)
Re: proposal: UTF8 to_ascii function  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Список pgsql-hackers

Pavel Stehule wrote:
>
>
> One note - convert_to is correct. But we have to use to_ascii without
> decode functions. It has same behave - convert from bytea to text.
> Text in "incorrect" encoding is dafacto bytea. So correct to_ascii
> function prototypes are:
>
> to_ascii(text)
> to_ascii(bytea, integer);
> to_ascii(bytea, name);
>
>   
>>     

What you have not said is how you propose to convert UTF8 to ASCII.

Currently to_ascii() converts a small number of single byte charsets to 
ASCII by folding the chars with high bits set, so what we get is a pure 
ASCII result which is safe in any server encoding, as they are all ASCII 
supersets.

But what conversion rule will you use for the gazillions of Unicode 
characters?

I honestly do not understand the use case for this at all.

cheers

andrew


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

Предыдущее
От: "Pavel Stehule"
Дата:
Сообщение: Re: proposal: UTF8 to_ascii function
Следующее
От: Jan Urbański
Дата:
Сообщение: Re: proposal: UTF8 to_ascii function