Re: Multibyte support in oracle_compat.c

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Cc: eutm(at)yandex(dot)ru
Subject: Re: Multibyte support in oracle_compat.c
Date: 2002-09-04 12:01:25
Message-ID: 20020904.210125.26536903.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 databases for Russian users and when i tried to use unicode encoding for database and Russsian alphabet than these functions didn't work. So i wrote some patches, because i don't think that problem is in that or other shell variable like LANG 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 patching and feel the difference:). And by the way, do encodings(and appropriative languages) EUC_JP,EUC_CN,EUC_KR and EUC_TW have 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,towlower from 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)

Attachment Content-Type Size
patches.tar.gz application/octet-stream 1.7 KB
test.tar.gz application/octet-stream 393 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2002-09-04 12:17:19 Re: HISTORY updated, 7.3 branded
Previous Message Tatsuo Ishii 2002-09-04 11:40:31 Re: HISTORY updated, 7.3 branded