Unix Technical Forum

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

This is a discussion on Help: chinese character set support (EUC_TW to/from BIG5 conversion) within the Pgsql General forums, part of the PostgreSQL category; --> 1. Would like to try if you've ever successfully put Chinese characters into the so-called "Postgresql" databases. Their four ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 09:28 PM
eblues
 
Posts: n/a
Default Help: chinese character set support (EUC_TW to/from BIG5 conversion)

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 09:28 PM
Douglas McNaught
 
Posts: n/a
Default Re: Help: chinese character set support (EUC_TW to/from BIG5 conversion)

"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

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 09:29 PM
Tatsuo Ishii
 
Posts: n/a
Default Re: Help: chinese character set support (EUC_TW to/from

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:
>
> $BBeb{(B:
>
> 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):
>
> $BBeb{(B:
>
> 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):
>
> $BBeb{(B:
>
> 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
>


---------------------------(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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 09:29 PM
eric
 
Posts: n/a
Default Re: Help: chinese character set support (EUC_TW to/from

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:23 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com