Re: character conversion problem about UTF-8-->SHIFT_JIS_2004 - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: character conversion problem about UTF-8-->SHIFT_JIS_2004
Date
Msg-id 20080213121025.GE7043@alvh.no-ip.org
Whole thread Raw
In response to Re: character conversion problem about UTF-8-->SHIFT_JIS_2004  ("bh yuan" <bhyuan@gmail.com>)
List 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.

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: 8.3 and uuid: unable to run uuid-ossp.sql
Next
From: "Dawid Kuroczko"
Date:
Subject: Re: Perceived weaknesses of postgres