Re: upper()/lower() truncates the result under Japanese Windows

Поиск
Список
Период
Сортировка
От Hiroshi Inoue
Тема Re: upper()/lower() truncates the result under Japanese Windows
Дата
Msg-id 4946D7F2.3070908@tpf.co.jp
обсуждение исходный текст
Ответ на Re: upper()/lower() truncates the result under Japanese Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:
> Hiroshi Inoue <inoue@tpf.co.jp> writes:
>> Upper(), lower() or initcap() function truncates the result
>> under Japanese Windows with e.g. the server encoding=UTF-8
>> and the LC_CTYPE setting Japanese_japan.932 .
> 
> Hmm, I guess that makes sense, since the LC_CTYPE implies an encoding
> other than UTF-8; MB_CUR_MAX should be set according to LC_CTYPE.
> 
> The proposed patch seems pretty ugly though.  Why don't we just stop
> using MB_CUR_MAX altogether?  These three functions are the only
> references to it AFAICS.

Although it looks ugly, it only follows what wchar2char() does.
Though I don't like to use MB_CUR_MAX, it seems safe as long as
wchar2char() calls wcstombs().

regards,
Hiroshi Inoue




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] odd output in restore mode
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: [PATCHES] odd output in restore mode