Hi Teodor-san.
Sorry late reaction.
----- Original Message -----
From: "Teodor Sigaev" <teodor@sigaev.ru>
>> If there's an effective function like pg_wchar2mb_with_len() which
>> converts wchar_t strings to server encoded strings, we had better
>> simply call it for char2wchar().
> I don't see a way to produce correct result of char2wchar with C-locale and
> sizeof(wchar_t) = 2.
>
> In summary, I suggest to remove support of C-locale from char2wchar function and
> tsearch's parser should directly use pg_mb2wchar_with_len() in case of
> C-locale and multibyte encoding. In all other places char2wchar is called only
> for non-C locale.
>
> Please, test attached patch.
Um, I think your patch like the overkill reaction of C-locale...
However, I tried your patch.
make check MULTIBYTE=euc_jp NO_LOCALE=true
...
=======================All 120 tests passed.
=======================
Anyway, either should be applied.
Thanks.
Regards,
Hiroshi Saito