Search Postgresql Archives

Re: character conversion problem about UTF-8-->SHIFT_JIS_2004

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

By use # \l ,the 7.4.3 version database show
        List of databases
   Name    |  Owner   | Encoding
-----------+----------+-----------
 testdbxx   | userxxx | UNICODE
 template0 | postgres | SQL_ASCII
 template1 | postgres | SQL_ASCII
(3 rows)

I think [some character codes may not have a conversion table] is the reasion.
Now I occour 「〜」(0xefbd9e)、「―」(0xe28095)、「郄」(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  ?

Thanks

2008/2/8, Hiroshi Saito <z-saito@xxxxxxxxxxxxxxxx>:
> Hi.
>
> >> use set client_encoding=''SJIS be the same to export PGCLIENTENCODING=SJIS.
> >>
> >> But can not export the data to csv file corecttly without errror,
> >> just because the character which is not SJIS encoding.
>
> Um, Please show the information on your database of 7.3.
>
> ex)
> postgres=# \l
>         List of databases
>    Name    |  Owner   | Encoding
> -----------+----------+----------
>  postgres  | postgres | UTF8
>  template0 | postgres | UTF8
>  template1 | postgres | UTF8
> (3 rows)
>
> Probably, your database is SQL_ASCII ?
>
> Regards,
> Hiroshi Saito
>

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux