]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Fix comments for Korean encodings in encnames.c
authorThomas Munro <tmunro@postgresql.org>
Thu, 16 Apr 2026 06:17:05 +0000 (18:17 +1200)
committerThomas Munro <tmunro@postgresql.org>
Thu, 16 Apr 2026 06:17:05 +0000 (18:17 +1200)
  * JOHAB: replace the incorrect "simplified Chinese" description with
    a correct one that identifies it as the Korean combining (Johab)
    encoding standardized in KS X 1001 annex 3.

  * EUC_KR: drop a stray space before the comma in the existing
    comment, and note that the encoding covers the KS X 1001
    precomposed (Wansung) form.

  * UHC: spell out "Unified Hangul Code", clarify that it is
    Microsoft Windows CodePage 949, and describe its relationship to
    EUC-KR (superset covering all 11,172 precomposed Hangul syllables).

Backpatch-through: 14
Author: Henson Choi <assam258@gmail.com>
Discussion: https://postgr.es/m/CAAAe_zAFz1v-3b7Je4L%2B%3DwZM3UGAczXV47YVZfZi9wbJxspxeA%40mail.gmail.com

src/common/encnames.c

index 9085dbecce1fbd3e544d48f6cc390ef8d3e5cdaa..959b991dde44d0dc05643b0ee695c6c47b363fc1 100644 (file)
@@ -61,8 +61,9 @@ static const pg_encname pg_encname_tbl[] =
                                                                 * Japanese, standard OSF */
        {
                "euckr", PG_EUC_KR
-       },                                                      /* EUC-KR; Extended Unix Code for Korean , KS
-                                                                * X 1001 standard */
+       },                                                      /* EUC-KR; Extended Unix Code for Korean
+                                                                * precomposed (Wansung) encoding, standard KS
+                                                                * X 1001 */
        {
                "euctw", PG_EUC_TW
        },                                                      /* EUC-TW; Extended Unix Code for
@@ -119,8 +120,8 @@ static const pg_encname pg_encname_tbl[] =
        },                                                      /* ISO-8859-9; RFC1345,KXS2 */
        {
                "johab", PG_JOHAB
-       },                                                      /* JOHAB; Extended Unix Code for simplified
-                                                                * Chinese */
+       },                                                      /* JOHAB; Korean combining (Johab) encoding,
+                                                                * standard KS X 1001 annex 3 */
        {
                "koi8", PG_KOI8R
        },                                                      /* _dirty_ alias for KOI8-R (backward
@@ -186,7 +187,9 @@ static const pg_encname pg_encname_tbl[] =
        },                                                      /* alias for WIN1258 */
        {
                "uhc", PG_UHC
-       },                                                      /* UHC; Korean Windows CodePage 949 */
+       },                                                      /* UHC; Unified Hangul Code, Microsoft Windows
+                                                                * CodePage 949; superset of EUC-KR covering
+                                                                * all 11,172 precomposed Hangul syllables */
        {
                "unicode", PG_UTF8
        },                                                      /* alias for UTF8 */