From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> |
Cc: | "Florian Helmberger" <f(dot)helmberger(at)uptime(dot)at>, "Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCHES] Changes in /contrib/fulltextindex |
Date: | 2002-07-01 13:28:30 |
Message-ID: | 9389.1025530110@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au> writes:
> Good idea. Is there a locale-aware version of isalpha anywhere?
>>
>> If there is - I couldn't find it. I did find a lot of frustated
>> posts about isalpha and locale-awareness although.
> Yeah, I can't find anything in the man pages either. Maybe we can ask the
> list. People?
Huh? isalpha() *is* locale-aware according to the ANSI C spec.
For instance, the attached test program finds 52 alpha characters
in C locale and 114 in fr_FR locale under HPUX.
I am not at all sure that this aspect of Florian's change is a good
idea, as it appears to eliminate locale-awareness in favor of a hard
coded delimiter list.
regards, tom lane
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <locale.h>
int main(int argc, char **argv)
{
int i;
setlocale(LC_ALL, "");
for (i = 0; i < 256; i++)
if (isalpha(i))
printf("%d %c\n", i, i);
return 0;
}
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-07-01 13:40:55 | Re: DROP COLUMN Proposal |
Previous Message | Manfred Koizar | 2002-07-01 10:40:35 | HeapTupleHeader withoud oid |