Artur Zakirov <a.zaki...@postgrespro.ru> writes:
> I agree that previous patch is wrong. Instead of using new
> parse_ooaffentry() function maybe better to use sscanf() with %ls
> format. The %ls format is used to read a wide character string.
No, that way is going to give you worse portability problems than what
we have now. Older implementations won't have %ls, and even if they
do, they might not have wcstombs() which is the only way you'd get from
libc's idea of wide characters to an encoding we recognize.
> I think this is not a bug. It is a normal behavior. In Mac OS sscanf()
> with the %s format reads the string one character at a time. The size of
> letter 'Ñ
' is 2. And sscanf() separate it into two wrong characters.
That argument might be convincing if OSX behaved that way for all
multibyte characters, but it doesn't seem to be doing that. Why is
regards, tom lane
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: