"Marko Kreen" <markokr@gmail.com> writes:
> There's another thing I'm probably missing: does current code handle
> multi-wchar codepoints? Or is it guaranteed they don't happen?
AFAIK we disallow multi-wchar situations (by rejecting the UTF8
combining codes).
> (Wasn't wchar_t usually 16bit value?)
Hmm. It's unsigned int on my ancient HPUX box. I think we could have a
problem on any machines whose mbstowcs doesn't support 4-byte UTF8
codes, though ... in particular, what about Windows?
regards, tom lane