encoding name "SHIFT_JIS" is absent in chklocale.c

Started by Tatsuo Ishiiover 12 years ago2 messageshackers
Jump to latest
#1Tatsuo Ishii
t-ishii@sra.co.jp

I got a complain from a user.

If current locale is SJIS, psql does not set client encoding to SJIS.

# localedef -f SHIFT_JIS -i ja_JP /usr/lib/locale/ja_JP.SJIS
$ export LANG=ja_JP.SJIS
$ psql
\encoding
SQL_ASCII <-- This should be SJIS

This is because the encoding map (encoding_match_list) in chklocale.c
is lacking the definition for SHIFT_JIS. Included is a proposed
patch. If there's no objection, I will commit it.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

Attachments:

shift_jis.patchtext/x-patch; charset=us-asciiDownload+1-0
#2Tatsuo Ishii
t-ishii@sra.co.jp
In reply to: Tatsuo Ishii (#1)
Re: encoding name "SHIFT_JIS" is absent in chklocale.c

I got a complain from a user.

If current locale is SJIS, psql does not set client encoding to SJIS.

# localedef -f SHIFT_JIS -i ja_JP /usr/lib/locale/ja_JP.SJIS
$ export LANG=ja_JP.SJIS
$ psql
\encoding
SQL_ASCII <-- This should be SJIS

This is because the encoding map (encoding_match_list) in chklocale.c
is lacking the definition for SHIFT_JIS. Included is a proposed
patch. If there's no objection, I will commit it.

Done.

Best regards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers