Re: Bug in UTF8-Validation Code?
Mario Weilguni <mweilguni@sime.com>
From: Mario Weilguni <mweilguni@sime.com>
To: pgsql-hackers@postgresql.org, Martijn van Oosterhout <kleptog@svana.org>
Cc: Andrew Dunstan <andrew@dunslane.net>, Jeff Davis <pgsql@j-davis.com>, Michael Fuhr <mike@fuhr.org>, "Joshua D. Drake" <jd@commandprompt.com>, Albe Laurenz <all@adv.magwien.gv.at>
Date: 2007-03-19T12:42:35Z
Lists: 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