Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem
Дата
Msg-id 199906101430.XAA00764@ext16.sra.co.jp
обсуждение исходный текст
Ответ на Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem  (Daniel Kalchev <daniel@digsys.bg>)
Ответы Re: [HACKERS] Postgres 6.5 beta2 and beta3 problem
Список pgsql-hackers
> 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: A James Lewis
Дата:
Сообщение: Re: Real Programmers (was: [HACKERS] Priorities for 6.6)
Следующее
От: "Oliver Elphick"
Дата:
Сообщение: Patch for m68k architecture