On Jul23, 2011, at 00:04 , Joey Adams wrote: > I think I've decided to only allow escapes of non-ASCII characters > when the database encoding is UTF8. For example, $$"\u2013"$$::json > will fail if the database encoding is WIN1252, even though WIN1252 can > encode U+2013 (EN DASH). This may be somewhat draconian, given that: > > * SQL_ASCII can otherwise handle "any" language according to the > documentation.
+1. It makes the handling if \uXXXX sequences consistent with the behaviour of CHR(), which seems like a Good Thing. Clients can also work around this restriction be de-escaping themselves, which shouldn't be too hard. > * The XML type doesn't have this restriction (it just stores the > input text verbatim, and converts it to UTF-8 before doing anything > complicated with it). Yeah. But the price the XML type pays for that is the lack of an equality operator. best regards, Florian Pflug -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers