I think that Mr. Inoue's patch is right.
why isn't it taken into consideration yet?

I can't check that patch because I don't have a Windows box.
But I did some investigations. As I understand, the patch prevents from calling of wcstombs/mbstowcs with C locale and I checked trace for that. But wcstombs/mbstowcs doesn't called at all with C-locale. With C locale char2wchar calls pg_mb2wchar_with_len(), and char2wchar is called from single place: TParserInit. wchar2char isn't called at all. Next, regression tests are successfully passed until ispell_tst configuration was created. Looking at diff
   SELECT to_tsquery('ispell_tst', 'footballyklubber:b & rebookings:A & sky');^M
to_tsquery ^M ! -----------------------------------------------------------------------------------------------------^M ! 'f':B & 'o':B & 'b':B & 'l':B & 'y':B & 'l':B & 'b':B & 'e':B & 'r':A & 'b':A & 'o':A & 'g':A & 'y'^M

I believe that even here parser is working correctly but there is problems in ispell.

So, although patch fixes the problem, it seems to me patch doesn't do it in right place. The patch converts multibyte string in non-utf encoding with C-locale into wide string by multibyte->utf8->wide conversation instead of pg_mb2wchar_with_len() call. Is output of pg_mb2wchar_with_len() compatible with isalpha (and others) functions?



--
Teodor Sigaev                                   E-mail: teo...@sigaev.ru
                                                   WWW: http://www.sigaev.ru/

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to