Re: Unicode string literals versus the world

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Unicode string literals versus the world
Дата
Msg-id 200904141553.52181.peter_e@gmx.net
обсуждение исходный текст
Ответ на Re: Unicode string literals versus the world  (Marko Kreen <markokr@gmail.com>)
Ответы Re: Unicode string literals versus the world  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
On Tuesday 14 April 2009 14:38:38 Marko Kreen wrote:
> I think the problem is that they should not act like E'' strings, but they
> should act like plain '' strings - they should follow stdstr setting.
>
> That way existing tools that may (or may not..) understand E'' and stdstr
> settings, but definitely have not heard about U&'' strings can still
> parse the SQL without new surprises.

Can you be more specific in what "surprises" you expect?  What algorithms do 
you suppose those "existing tools" use and what expectations do they have?

> 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.

This doesn't excite me.  I think the tendency should be to get rid of E'' 
usage, because its definition of escape sequences is single-byte and ASCII 
centric and thus overall a legacy construct.  Certainly, we will want to keep 
around E'' for a long time or forever, but it is a legitimate goal for 
application writers to not use it, which is after all the reason behind this 
whole standards-conforming strings project.  I wouldn't want to have a 
forward-looking feature such as the Unicode escapes be burdened with that kind 
of legacy behavior.

Also note that Unicode escapes are also available for identifiers, for which 
there is no existing E"" that you can add it to.


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

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