From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | bh yuan <bhyuan(at)gmail(dot)com> |
Cc: | Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: character conversion problem about UTF-8-->SHIFT_JIS_2004 |
Date: | 2008-02-13 12:10:25 |
Message-ID: | 20080213121025.GE7043@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
bh yuan escribió:
> I think [some character codes may not have a conversion table] is the reasion.
> Now I occour 「〜」(0xefbd9e)、「―」(0xe28095)、「?b!W(0xe9ab99) can not be
> converted to SJIS without error message.
>
> I convert the character to another SJIS character
> by UPDATE tablexx SET fieldxx=replace(fieldxx,'\xef\xbd\x9e','~')
> then I can export it as SJIS CSV file.
> But it is not good idea, maybe I can config the setting file of postgresql8.3
> or change the conversion table by myself ?
I guess you can change the conversion table yourself -- see
src/backend/utils/mb/Unicode. I think you would have to edit the
sjis-0213-2004-std.txt file to add those characters, then run
UCS_to_SHIFT_JIS_2004.pl to generate the updated .map file, then
regenerate the shared lib at
src/backend/utils/mb/conversion_procs/utf8_and_shift_jis_2004, and
reinstall it.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Dawid Kuroczko | 2008-02-13 12:29:14 | Re: Perceived weaknesses of postgres |
Previous Message | Alvaro Herrera | 2008-02-13 11:35:07 | Re: 8.3 and uuid: unable to run uuid-ossp.sql |