Re: Unicode string literals versus the world

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема Re: Unicode string literals versus the world
Дата
Msg-id 49E62C86.4040009@dunslane.net
обсуждение исходный текст
Ответ на Re: Unicode string literals versus the world  (Martijn van Oosterhout <kleptog@svana.org>)
Ответы Re: Unicode string literals versus the world  (Tatsuo Ishii <ishii@postgresql.org>)
Список pgsql-hackers

Martijn van Oosterhout wrote:
> On Tue, Apr 14, 2009 at 08:10:54AM -0400, Andrew Dunstan wrote:
>   
>> Marko Kreen wrote:
>>     
>>> I still stand on my proposal, how about extending E'' strings with
>>> unicode escapes (eg. \uXXXX)?  The E'' strings are already more
>>> clearly defined than '' and they are our "own", we don't need to
>>> consider random standards, but can consider our sanity.
>>>       
>> I suspect there would be lots more support in the user community, where 
>> \uXXXX is well understood in a number of contexts (Java and ECMAScript, 
>> for example). It's also tolerably sane.
>>     
>
> By the way, that's an example of how to do it wrong, there are more
> than 2^16 unicode characters, you want to be able to support the full
> 21-bit range if you're going to do it right.
>
> FWIW, I prefer the perl syntax which simply extends \x: \x{1344}, which
> makes it clear it's hex and doesn't make assumptions as to how many
> characters are used.
>   

I could live with either. Wikipedia says: "The characters outside the 
first plane usually have very specialized or rare use." For years we 
rejected all characters beyond the first plane, and while that's fixed 
now, the volume of complaints wasn't huge.

cheers

andrew

> Have a nice day,
>   


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

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: Unicode string literals versus the world
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Unicode string literals versus the world