Hi,
while I'm doing more accurate test I just want to ask if
somebody test locale in 7.0.2 under FreeBSD ?
the point is that I usually compile postgres with
--enable-locale --enable-multibyte and never had a problem
with locale. Today I decided to use only --enable-locale
and found that LC_CTYPE support seems broken in 7.0.2
under FreeBSD 4.01. release.
I used folowing select: select c_name from city where c_name ~* 'ΑΜ';
interesting that there are no problem under Linux !
I used the same compiler gcc version 2.95.2 19991024 (release)
on both systems. One hypothesis is that gcc 2.95.2 under Linux
treats 'char' as 'unsigned char' while on FreeBSD there is no such
default. This could be demonstrated using test-ctype.c from
src/test/locale directory. In current version there is
.......
void
describe_char(int c)
{
char cp = c,
up = toupper(c),
lo = tolower(c);
...........
which works as expected on Linux and broken under FreeBSD (gcc 2.95.2)
It's clear that we must use 'unsigned char' instead of 'char'
and corrected version runs ok on both systems. That's why I suspect
that gcc 2.95.2 has different default under FreeBSD which could
cause problem with LC_CTYPE in 7.0.2
I didn't test current CVS under FreeBSD but probably will check it.
Regards,
Oleg
PS.
forget to mention that collation works fine
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: [EMAIL PROTECTED], http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83