Re: regular expressions stranges

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: regular expressions stranges
Дата
Msg-id 45B6276F.6050404@sigaev.ru
обсуждение исходный текст
Ответ на Re: regular expressions stranges  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: regular expressions stranges  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
> The regex code is working with pg_wchar strings, which aren't
> necessarily the same representation that the OS' wide-char functions
> expect.  If we could guarantee compatibility then the above plan
> would make sense ...

it seems to me, that is possible for UTF8 encoding. So isalpha() function may be 
defined as:

static int
pg_wc_isalpha(pg_wchar c)
{    if ( (c >= 0 && c <= UCHAR_MAX) )return isalpha((unsigned char) c)
#ifdef HAVE_WCSTOMBS    else if ( GetDatabaseEncoding() == PG_UTF8 )return iswalpha((wint_t) c)
#endif    return 0;
}



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


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

Предыдущее
От:
Дата:
Сообщение: Re: STOP all user access except for admin for a few minutes?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: regular expressions stranges