Re: A thought about regex versus multibyte character sets
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgresql.org
Date: 2009-12-01T03:13:10Z
Lists: pgsql-hackers
Attachments
- utf8-regex-1.patch (text/x-patch) patch
I wrote: > I therefore propose the following idea: if the database encoding is > UTF8, allow the regc_locale.c functions to call the <wctype.h> > functions, assuming that wchar_t and pg_wchar_t share the same > representation. On platforms where wchar_t is only 16 bits, we can do > this up to U+FFFF and be stupid about code points above that. Or to be concrete, how about the attached? It seems to do what's wanted, but I'm hardly the best-qualified person to test it. regards, tom lane