Re: Multibyte support in oracle_compat.c - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: Multibyte support in oracle_compat.c
Date
Msg-id 20020904.210125.26536903.t-ishii@sra.co.jp
Whole thread Raw
Responses Re: Multibyte support in oracle_compat.c  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
>     I found one bug in file src/backend/utils/adt/oracle_compat.c and there were your name, related with Multibyte
enhancement,so i write to you.
 
>     Functions upper,lower and initcap doesn't work with utf-8 data which is not of Latin letters.At my work i do
databasesfor Russian users and when i tried to use unicode encoding for database and Russsian alphabet than these
functionsdidn't work. So i wrote some patches, because i don't think that problem is in that or other shell variable
likeLANG or LC_CTYPE. As i don't know any other 
 
> languages except Russian and English, i wrote small test(test.tar.gz) only for them.Execute it befor and after
patchingand feel the difference:). And by the way, do encodings(and appropriative languages) EUC_JP,EUC_CN,EUC_KR and
EUC_TWhave logical operations upper,lower and initcap? 
 
>                         regards,Eugene.

For EUC_JP, there is no upper,lower and initcap. I'm not sure about
other languages.

>     P.S.It doesn't seem bad for me to use lib unicode instead of functions like mbtowc,wctomb from stdlib and
towupper,towlowerfrom wctype, but may be somebody will find decision based on them or other lib?
 

I'm not sure. What do you think, Peter or other guys who is familiar
with Unicode?

BTW, I don't like your patches. If there's no unicode.h, configure
aborts with:

configure: error: header file <unicode.h> is required for unicode support

which seems not acceptable to me. I suggest you #ifdef out the unicode
upper,lower and initcap support if libunicode and/or unicode.h are not
found in the system.
--
Tatsuo Ishii

(I have included patches for review purpose)

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: HISTORY updated, 7.3 branded
Next
From: Rod Taylor
Date:
Subject: Re: HISTORY updated, 7.3 branded