Re: Bug in UTF8-Validation Code? - Mailing list pgsql-hackers

From Mario Weilguni
Subject Re: Bug in UTF8-Validation Code?
Date
Msg-id 200703191342.36135.mweilguni@sime.com
Whole thread Raw
In response to Re: Bug in UTF8-Validation Code?  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
Am Sonntag, 18. März 2007 12:36 schrieb Martijn van Oosterhout:
>
> It seems to me that the easiest solution would be to forbid \x?? escape
> sequences where it's greater than \x7F for UTF-8 server encodings.
> Instead introduce a \u escape for specifying the unicode character
> directly. Under the basic principle that any escape sequence still has
> to represent a single character. The result can be multiple bytes, but
> you don't have to check for consistancy anymore.

Would'nt the best solution to change the order of
validation/convert_backslash_sequences better? First convert the sequences,
and reject them in the validation stage?

Regards
Mario Weilguni


pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Indexam interface proposal
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Indexam interface proposal