[Zope] locale and Splitter.c on FreeBSD - where is the bug ?

Aleksander Salwa ololo@zeus.polsl.gliwice.pl
Sat, 9 Sep 2000 09:15:45 +0200 (CEST)


Some time ago I had a problem with locales on FreeBSD.
Finally, I solved it by patching Splitter.c.

I added casting of values passed to funtions isalpha, isalnum to
type 'unsigned char'. They are declared in Splitter.c as 'char'.

On all machines I'm working on, 'char' is signed.
On Linux/x86, isalpha and others works fine with positive and negative
values of national characters. (For example, one polish character is
'\xc6', what can be evaluated as unsigned 198, or signed -58.)
But on FreeBSD/x86 these functions work only with values >127.
Because 'char' is signed, it needs casting to work with national
characters.

Now, the question is: is it a bug in Splitter.c or in FreeBSD system
libraries ? (or misconfigured system)


ololo@zeus.polsl.gliwice.pl

/--------------------------------------\
| `long long long' is too long for GCC |
\--------------------------------------/