Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ?
От | Tatsuo Ishii |
---|---|
Тема | Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ? |
Дата | |
Msg-id | 20000918100057C.t-ishii@sra.co.jp обсуждение исходный текст |
Ответ на | Re: broken locale in 7.0.2 without multibyte support (FreeBSD 4.1-RELEASE) ? (Oleg Bartunov <oleg@sai.msu.su>) |
Список | pgsql-hackers |
> backend/regex/regcomp.c cause the problem. I compiled only this file > with -funsigned-char option and the problem gone away ! > Also, I know that in case of --enable-multibyte I dont' have any problem, > so in principle it's enough to look into > #ifdef MULTIBYTE sections in backend/regex/regcomp.c > and made according > #ifdef USE_LOCALE sections > > Tatsuo, am I right and what critical sections in backend/regex/regcomp.c ? Besides the toupper etc. vs. signed char issues, there is an upper limit of char values defined in include/regex/regex2.h. For none MB installtions, it is defined as: #define OUT (CHAR_MAX+1) /* a non-character value */ where CHAR_MAX gives 255 for "char = unsigned char" platforms. This is good. However it gives 127 for "char = signed char" platforms. So if you have some none ascii letters greater than 128 on "char = unsigned char" platforms, you will lose. Changing above to: #define OUT (UCHAR_MAX+1) /* a non-character value */ might help... -- Tatsuo Ishii
В списке pgsql-hackers по дате отправления: