]> granicus.if.org Git - postgresql/commitdiff
Add "SHIFT_JIS" as an accepted encoding name for locale checking.
authorTatsuo Ishii <ishii@postgresql.org>
Sun, 15 Dec 2013 01:33:06 +0000 (10:33 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Sun, 15 Dec 2013 02:10:41 +0000 (11:10 +0900)
When locale is "ja_JP.SJIS", nl_langinfo(CODESET) returns "SHIFT_JIS"
on some platforms, at least on RedHat Linux. So the encoding/locale
match table (encoding_match_list) needs the entry. Otherwise client
encoding is set to SQL_ASCII.

Back patch to all supported branches.

src/port/chklocale.c

index 9e889383f26ade91f1c92e0491adff51c592a676..36296a18bc1dd4a595af43278eb439e01b0111b4 100644 (file)
@@ -162,6 +162,7 @@ static const struct encoding_match encoding_match_list[] = {
        {PG_SJIS, "SJIS"},
        {PG_SJIS, "PCK"},
        {PG_SJIS, "CP932"},
+       {PG_SJIS, "SHIFT_JIS"},
 
        {PG_BIG5, "BIG5"},
        {PG_BIG5, "BIG5HKSCS"},