Received: from maia.hub.org (maia-1.hub.org [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 87A79633036 for ; Tue, 27 Apr 2010 08:06:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 88915-04 for ; Tue, 27 Apr 2010 11:06:09 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from exprod7og113.obsmtp.com (exprod7og113.obsmtp.com [64.18.2.179]) by mail.postgresql.org (Postfix) with SMTP id F3E4E632971 for ; Tue, 27 Apr 2010 08:06:14 -0300 (ADT) Received: from source ([74.125.78.24]) by exprod7ob113.postini.com ([64.18.6.12]) with SMTP ID DSNKS9bFJcUM3gjjy02Xk0gl7bkSPvfDmDBX@postini.com; Tue, 27 Apr 2010 04:06:14 PDT Received: by ey-out-2122.google.com with SMTP id 9so253289eyd.5 for ; Tue, 27 Apr 2010 04:06:12 -0700 (PDT) Received: by 10.213.41.131 with SMTP id o3mr272886ebe.68.1272366372767; Tue, 27 Apr 2010 04:06:12 -0700 (PDT) Received: from [192.168.1.117] (dsl-hkibrasgw2-ff67c300-165.dhcp.inet.fi [88.195.103.165]) by mx.google.com with ESMTPS id 14sm2692357ewy.10.2010.04.27.04.06.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 27 Apr 2010 04:06:11 -0700 (PDT) Message-ID: <4BD6C522.80200@enterprisedb.com> Date: Tue, 27 Apr 2010 14:06:10 +0300 From: Heikki Linnakangas Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090706) MIME-Version: 1.0 To: Takahiro Itagaki CC: pgsql-hackers@postgresql.org Subject: Re: CP949 for EUC-KR? References: <20100427192740.9B68.52131E4D@oss.ntt.co.jp> In-Reply-To: <20100427192740.9B68.52131E4D@oss.ntt.co.jp> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201004/1249 X-Sequence-Number: 161361 Takahiro Itagaki wrote: > I heard pg_get_encoding_from_locale() failed in kor locale. > > WARNING: could not determine encoding for locale "kor": codeset is "CP949" > > I found the following description in the web: > CP949 is EUC-KR, extended with UHC (Unified Hangul Code). > http://www.opensource.apple.com/source/libiconv/libiconv-13.2/libiconv/lib/cp949.h > > but we define CP51949 for EUC-KR in chklocale.c. > {PG_EUC_KR, "CP51949"}, /* or 20949 ? */ > > Which is the compatible codeset with our PG_EUC_KR encoding? > 949, 51949, or 20949? A bit of googling suggests that 51949 is indeed the Windows codepage that's equivalent with EUC-KR. > Should we add (or replace) CP949 for EUC-KR? No. CP949 is not plain EUC-KR, but EUC-KR with some extensions (UHC). At least on CVS HEAD, we recognize CP949 as an alias for the PostgreSQL PG_UHC encoding. There's a significant difference between the two, because PG_EUC_KR is supported as a server-encoding while PG_UHC is not. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com