Re: [rfc] unicode escapes for extended strings - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: [rfc] unicode escapes for extended strings
Date
Msg-id e51f66da0909231246m2cb4276aq3e147c098ea5fd32@mail.gmail.com
Whole thread Raw
In response to Re: [rfc] unicode escapes for extended strings  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: [rfc] unicode escapes for extended strings
List pgsql-hackers
On 9/23/09, Peter Eisentraut <peter_e@gmx.net> wrote:
> On Wed, 2009-09-09 at 18:26 +0300, Marko Kreen wrote:
> > Unicode escapes for extended strings.
>
> Committed.

Thank you for handling the patch.


I looked at your code for U& and saw that you allow standalone
second half of the surrogate pair there, although you error
out on first half.  Was that deliberate?

Standalone surrogate halfs cause headaches for anything that wants to
handle data in UTF16.  The area 0xD800-0xDFFF is explicitly reserved
for UTF16 encoding and does not contain any valid Unicode codepoints.

Perhaps pg_verifymbstr() should be made to check for such values,
because even if we fix the escaping code, such data can still be
inserted via plain utf8 or \x escapes?

-- 
marko


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: TODO item: Allow more complex user/database default GUC settings
Next
From: Stef Walter
Date:
Subject: Re: pg_hba.conf: samehost and samenet [REVIEW]