> I believe we can make the assumption, that if you --enable-locale, but do not
> use --with-mb, then you are using single-byte locales and therefore the hack
> might work properly.
I believe at least one person uses both --enable-locale and --with-mb
for single byte locale.
> If you use --with-mb you are out of luck until someone
> explains better how multibyte characters are ordered.
I think until NATIONAL CHARACTER is fully implemented, we would not be
able to properly handle sort orders with multi-byte characters.
(Thomas, I've been think about implementing NCHAR too!)
So you could do whatever you like as long as they are in #ifndef
MULTIBYTE:-)
> I found this later problem to be resolved by modifying the
> backend/regex/makefile to add -funsigned-char to CFLAGS. This is under BSD/OS
> 4.0.1 - I found out, that by default characters that are 'alpha' in cyrillic
> are threated by the compiler as negative and therefore isalpha() returns
> zero... I believe this should be fixed as it may be causing other problems
> with non-ASCII locales.
>
> My proposal is to add -funsigned-char to all places where routines such as
> 'isalpha' are used, and ifdef it for USE_LOCALE.
Once I propsed another solution to BSD/OS guy (I don't remember who he
was) and asked him to check if it worked. Unfortunately I got no
answer from him. Then I merged it into #ifdef MULTIBYTE sections in
regcomp.c and it seems work at least for cyrillic locale (Thanks Oleg
for testing!).
---
Tatsuo Ishii