Re: Regexps vs. locale

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: Regexps vs. locale
Дата
Msg-id 87vdtuo9bg.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: Regexps vs. locale  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Regexps vs. locale  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.us> writes:
> Andrew Gierth <andrew@tao11.riddles.org.uk> writes:>> Obviously, this happens because the locale support functions
in>>backend/regex/regc_locale.c are (presumably intentionally)>> crippled so as not to support non-ascii chars, despite
allthe>> code there using wide chars for everything otherwise.
 
Tom> It's not so much intentional as that no one has gotten around toTom> making it work.  The difficulty is that the
wide-charcodes weTom> are using might not match what the <wctype.h> functions expect,Tom> and it's unclear what we
coulddo to fix that.
 

Couldn't we follow the example of lower(), and convert the string to
wchar_t using mbstowcs (rather than pg_wchar_t and pg_mb2wchar)?

This obviously requires that we have a matching lc_ctype for the
encoding, but we insist on that now anyway, no?

-- 
Andrew.


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

Предыдущее
От: Decibel!
Дата:
Сообщение: Re: Hint bits vs. OS readahead
Следующее
От: Tom Lane
Дата:
Сообщение: Re: cvs head initdb hangs on unixware