> The regex character classes really ought to be encoding- and
> locale-aware. Right now they are not, but possibly something
> similar to what I recently did to the upper/lower/initcap functions
> would work --- that is, rely on the <wctype.h> C library instead of
> <ctype.h>. If you feel like working on this, the regex stubs are
> in src/backend/regex/regc_locale.c, and the upper/lower change
> is in src/backend/utils/adt/oracle_compat.c:
I'd love to contribute if I can. But I'm afraid I'm no i18n (or pg
codebase) expert and would need some guidance. If you can answer a
couple questions to get me started I'll gladly see if I can get some
working code.
How does pg_wchar (= unsigned int) work... is it always going to be a
straight Unicode character? Can I safely cast it to a wchar_t, is
there a suitable conversion function in wchar.h, or will I need to
write one that looks at some encoding variables?
Suppose I successfully update the regex char classification functions.
How could I set up an encoding/locale so that the character classes in
regular expressions would be locale-neutral? Remember my end goal is
to have some character class that matches *any* character which
Unicode calls a Letter. I don't want locale-awareness so much as I
want locale-neutrality.
Thanks,
--
David Norris
danorris@gmail.com