| From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: regular expressions stranges |
| Date: | 2007-01-23 15:19:11 |
| Message-ID: | 45B6276F.6050404@sigaev.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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(at)sigaev(dot)ru
WWW: http://www.sigaev.ru/
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Magnus Hagander | 2007-01-23 15:24:04 | Re: [HACKERS] Win32 WEXITSTATUS too |
| Previous Message | org | 2007-01-23 15:15:18 | Re: STOP all user access except for admin for a few minutes? |