Re: JSON and unicode surrogate pairs

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: JSON and unicode surrogate pairs
Дата
Msg-id 23366.1370879008@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: JSON and unicode surrogate pairs  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: JSON and unicode surrogate pairs  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> Or we could abandon the conversion altogether, but that doesn't seem 
> very friendly either. I suspect the biggest case for people to use these 
> sequences is where the database is UTF8 but the client encoding is not.

Well, if that's actually the biggest use-case, then maybe we should just
say we're *not* in the business of converting those escapes.  That would
make things nice and consistent regardless of the DB encoding, and it
would avoid the problem of being able to input a value and then not
being able to output it again.

It's legal, is it not, to just write the equivalent Unicode character in
the JSON string and not use the escapes?  If so I would think that that
would be the most common usage.  If someone's writing an escape, they
probably had a reason for doing it that way, and might not appreciate
our overriding their decision.
        regards, tom lane



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

Предыдущее
От: Will Crawford
Дата:
Сообщение: Re: SPGist "triple parity" concept doesn't work
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SPGist "triple parity" concept doesn't work