Обсуждение: Help: chinese character set support (EUC_TW to/from BIG5 conversion)

Поиск
Список
Период
Сортировка

Help: chinese character set support (EUC_TW to/from BIG5 conversion)

От
"eblues"
Дата:
1. Would like to try if you've ever successfully put Chinese characters
into the so-called "Postgresql" databases. Their four support
communities appear non-asian so far.

2. My problems is, although the 8.0 documentation (ch.14 pg. 292)
claims the conversion between EUC_TW and BIG5 is avalible, an actual
error message reveals it 's not supported, see below command and error
message:

代碼:

hongkong=# set client_encoding to 'BIG5';
ERROR:  conversion between BIG5 and EUC_TW is not supported


Am I missing something?


3. Below lists the server_encoding is EUC_TW (the only Traditional
Chinese it supports on the server side):

代碼:

hongkong=# \l
        List of databases
   Name    |  Owner   | Encoding
-----------+----------+-----------
 hongkong  | postgres | EUC_TW



4. fyi, sorry to dump you guy an "show all" screen (selected output):

代碼:

hongkong=# show all
hongkong-# ;
              name              |                       setting

-----------------------------------------------------------------------------------

......
 lc_collate                     | C
 lc_ctype                       | C
 lc_messages                    | C
 lc_monetary                    | C
 lc_numeric                     | C
 lc_time                        | C
....
 syslog_facility                | LOCAL0
 syslog_ident                   | postgres
 TimeZone                       | Hongkong
 ..
(139 rows)


cheers, thanks in advance.


Re: Help: chinese character set support (EUC_TW to/from BIG5 conversion)

От
Douglas McNaught
Дата:
"eblues" <ericpoon.mac@gmail.com> writes:

> 1. Would like to try if you've ever successfully put Chinese characters
> into the so-called "Postgresql" databases. Their four support
> communities appear non-asian so far.

There is a very larqe and active PG community in Japan.

Unfortunately, I'm no expert on Asian encodings, so I'm not sure I can
help further...

-Doug

Re: Help: chinese character set support (EUC_TW to/from

От
Tatsuo Ishii
Дата:
Strange. I have successfully set the client encoding to BIG5 with
PostgreSQL 8.0.3 on Linux.

$ psql euc_tw
Welcome to psql 8.0.3, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

euc_tw=# \encoding
EUC_TW
euc_tw=# set client_encoding to 'BIG5';
SET

I suspect you have some problems with your PostgreSQL installation.
--
Tatsuo Ishii

> 1. Would like to try if you've ever successfully put Chinese characters
> into the so-called "Postgresql" databases. Their four support
> communities appear non-asian so far.
>
> 2. My problems is, although the 8.0 documentation (ch.14 pg. 292)
> claims the conversion between EUC_TW and BIG5 is avalible, an actual
> error message reveals it 's not supported, see below command and error
> message:
>
> 代碼:
>
> hongkong=# set client_encoding to 'BIG5';
> ERROR:  conversion between BIG5 and EUC_TW is not supported
>
>
> Am I missing something?
>
>
> 3. Below lists the server_encoding is EUC_TW (the only Traditional
> Chinese it supports on the server side):
>
> 代碼:
>
> hongkong=# \l
>         List of databases
>    Name    |  Owner   | Encoding
> -----------+----------+-----------
>  hongkong  | postgres | EUC_TW
>
>
>
> 4. fyi, sorry to dump you guy an "show all" screen (selected output):
>
> 代碼:
>
> hongkong=# show all
> hongkong-# ;
>               name              |                       setting
>
> -----------------------------------------------------------------------------------
>
> ......
>  lc_collate                     | C
>  lc_ctype                       | C
>  lc_messages                    | C
>  lc_monetary                    | C
>  lc_numeric                     | C
>  lc_time                        | C
> ....
>  syslog_facility                | LOCAL0
>  syslog_ident                   | postgres
>  TimeZone                       | Hongkong
>  ..
> (139 rows)
>
>
> cheers, thanks in advance.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly
>

Re: Help: chinese character set support (EUC_TW to/from

От
"eric"
Дата:
You're right about it. After a 8.0.3 re-installation, the issue seems
to have gone.

See screen output:

euc_tw=# \d contacts
          Table "public.contacts"
Column |         Type          | Modifiers
--------+-----------------------+-----------
id     | integer               |
name   | character varying(50) |

euc_tw=# insert into contacts values('1','\345\244\251\345\244\251');
INSERT 17235 1
euc_tw=# select * from contacts
euc_tw-# ;
id |  name
----+--------
  1 | 天天
(1 row)


Thanks for pinpointing the potential cause, so makes the trouble
shooting a lot easier.


- eric