Commit cfff2326 authored by Luis Javier Merino's avatar Luis Javier Merino Committed by Tomaz Canabrava
Browse files

Make non-initial Korean Hangul Jamo width 0

Korean Hangul can be represented in Unicode either as precomposed Hangul
syllables, or as sequences of alphabetic components called Jamo.

Syllables should occupy 2 cells (there are halfwidth variants at
U+FFA0..U+FFDF).  A fully decomposed syllable consists of an initial
jamo (choseong - leading consonant - may be a filler U+115F), a medial
jamo (jungseong - vowel - may be a filler U+1160), and an optional final
jamo (jongseong - trailing consonant).  Old Korean can have more than
one of each of those.  In any case, to make the total width 2, we assign
width 2 to choseong, and 0 to jungseong and jongseong, which, absent a
context-aware wcswidth, will still break with Old Korean syllables with
more than one jamo for leading consonants.

This aligns with glibc:

commit 7a79e321c6f85b204036c33d85f6b2aa794e7c76
Author: Thorsten Glaser <tg@mirbsd.de>
Date:   Fri Jul 14 14:02:50 2017 +0200

    Refresh generated charmap data and ChangeLog

            [BZ #21750]
   ...
parent 2f700399
Pipeline #115321 passed with stage
in 1 minute and 53 seconds
......@@ -88,7 +88,7 @@ static constexpr const Range LUT_0[] = {
{0x000dd2,0x000dd4},{0x000dd6,0x000dd6},{0x000e31,0x000e31},{0x000e34,0x000e3a},{0x000e47,0x000e4e},{0x000eb1,0x000eb1},{0x000eb4,0x000ebc},{0x000ec8,0x000ecd},
{0x000f18,0x000f19},{0x000f35,0x000f35},{0x000f37,0x000f37},{0x000f39,0x000f39},{0x000f71,0x000f7e},{0x000f80,0x000f84},{0x000f86,0x000f87},{0x000f8d,0x000f97},
{0x000f99,0x000fbc},{0x000fc6,0x000fc6},{0x00102d,0x001030},{0x001032,0x001037},{0x001039,0x00103a},{0x00103d,0x00103e},{0x001058,0x001059},{0x00105e,0x001060},
{0x001071,0x001074},{0x001082,0x001082},{0x001085,0x001086},{0x00108d,0x00108d},{0x00109d,0x00109d},{0x001160,0x001160},{0x00135d,0x00135f},{0x001712,0x001714},
{0x001071,0x001074},{0x001082,0x001082},{0x001085,0x001086},{0x00108d,0x00108d},{0x00109d,0x00109d},{0x001160,0x0011ff},{0x00135d,0x00135f},{0x001712,0x001714},
{0x001732,0x001733},{0x001752,0x001753},{0x001772,0x001773},{0x0017b4,0x0017b5},{0x0017b7,0x0017bd},{0x0017c6,0x0017c6},{0x0017c9,0x0017d3},{0x0017dd,0x0017dd},
{0x00180b,0x00180f},{0x001885,0x001886},{0x0018a9,0x0018a9},{0x001920,0x001922},{0x001927,0x001928},{0x001932,0x001932},{0x001939,0x00193b},{0x001a17,0x001a18},
{0x001a1b,0x001a1b},{0x001a56,0x001a56},{0x001a58,0x001a5e},{0x001a60,0x001a60},{0x001a62,0x001a62},{0x001a65,0x001a6c},{0x001a73,0x001a7c},{0x001a7f,0x001a7f},
......@@ -100,31 +100,31 @@ static constexpr const Range LUT_0[] = {
{0x00a80b,0x00a80b},{0x00a825,0x00a826},{0x00a82c,0x00a82c},{0x00a8c4,0x00a8c5},{0x00a8e0,0x00a8f1},{0x00a8ff,0x00a8ff},{0x00a926,0x00a92d},{0x00a947,0x00a951},
{0x00a980,0x00a982},{0x00a9b3,0x00a9b3},{0x00a9b6,0x00a9b9},{0x00a9bc,0x00a9bd},{0x00a9e5,0x00a9e5},{0x00aa29,0x00aa2e},{0x00aa31,0x00aa32},{0x00aa35,0x00aa36},
{0x00aa43,0x00aa43},{0x00aa4c,0x00aa4c},{0x00aa7c,0x00aa7c},{0x00aab0,0x00aab0},{0x00aab2,0x00aab4},{0x00aab7,0x00aab8},{0x00aabe,0x00aabf},{0x00aac1,0x00aac1},
{0x00aaec,0x00aaed},{0x00aaf6,0x00aaf6},{0x00abe5,0x00abe5},{0x00abe8,0x00abe8},{0x00abed,0x00abed},{0x00fb1e,0x00fb1e},{0x00fe00,0x00fe0f},{0x00fe20,0x00fe2f},
{0x00feff,0x00feff},{0x00fff9,0x00fffb},{0x0101fd,0x0101fd},{0x0102e0,0x0102e0},{0x010376,0x01037a},{0x010a01,0x010a03},{0x010a05,0x010a06},{0x010a0c,0x010a0f},
{0x010a38,0x010a3a},{0x010a3f,0x010a3f},{0x010ae5,0x010ae6},{0x010d24,0x010d27},{0x010eab,0x010eac},{0x010f46,0x010f50},{0x010f82,0x010f85},{0x011001,0x011001},
{0x011038,0x011046},{0x011070,0x011070},{0x011073,0x011074},{0x01107f,0x011081},{0x0110b3,0x0110b6},{0x0110b9,0x0110ba},{0x0110bd,0x0110bd},{0x0110c2,0x0110c2},
{0x0110cd,0x0110cd},{0x011100,0x011102},{0x011127,0x01112b},{0x01112d,0x011134},{0x011173,0x011173},{0x011180,0x011181},{0x0111b6,0x0111be},{0x0111c9,0x0111cc},
{0x0111cf,0x0111cf},{0x01122f,0x011231},{0x011234,0x011234},{0x011236,0x011237},{0x01123e,0x01123e},{0x0112df,0x0112df},{0x0112e3,0x0112ea},{0x011300,0x011301},
{0x01133b,0x01133c},{0x011340,0x011340},{0x011366,0x01136c},{0x011370,0x011374},{0x011438,0x01143f},{0x011442,0x011444},{0x011446,0x011446},{0x01145e,0x01145e},
{0x0114b3,0x0114b8},{0x0114ba,0x0114ba},{0x0114bf,0x0114c0},{0x0114c2,0x0114c3},{0x0115b2,0x0115b5},{0x0115bc,0x0115bd},{0x0115bf,0x0115c0},{0x0115dc,0x0115dd},
{0x011633,0x01163a},{0x01163d,0x01163d},{0x01163f,0x011640},{0x0116ab,0x0116ab},{0x0116ad,0x0116ad},{0x0116b0,0x0116b5},{0x0116b7,0x0116b7},{0x01171d,0x01171f},
{0x011722,0x011725},{0x011727,0x01172b},{0x01182f,0x011837},{0x011839,0x01183a},{0x01193b,0x01193c},{0x01193e,0x01193e},{0x011943,0x011943},{0x0119d4,0x0119d7},
{0x0119da,0x0119db},{0x0119e0,0x0119e0},{0x011a01,0x011a0a},{0x011a33,0x011a38},{0x011a3b,0x011a3e},{0x011a47,0x011a47},{0x011a51,0x011a56},{0x011a59,0x011a5b},
{0x011a8a,0x011a96},{0x011a98,0x011a99},{0x011c30,0x011c36},{0x011c38,0x011c3d},{0x011c3f,0x011c3f},{0x011c92,0x011ca7},{0x011caa,0x011cb0},{0x011cb2,0x011cb3},
{0x011cb5,0x011cb6},{0x011d31,0x011d36},{0x011d3a,0x011d3a},{0x011d3c,0x011d3d},{0x011d3f,0x011d45},{0x011d47,0x011d47},{0x011d90,0x011d91},{0x011d95,0x011d95},
{0x011d97,0x011d97},{0x011ef3,0x011ef4},{0x013430,0x013438},{0x016af0,0x016af4},{0x016b30,0x016b36},{0x016f4f,0x016f4f},{0x016f8f,0x016f92},{0x016fe4,0x016fe4},
{0x01bc9d,0x01bc9e},{0x01bca0,0x01bca3},{0x01cf00,0x01cf2d},{0x01cf30,0x01cf46},{0x01d167,0x01d169},{0x01d173,0x01d182},{0x01d185,0x01d18b},{0x01d1aa,0x01d1ad},
{0x01d242,0x01d244},{0x01da00,0x01da36},{0x01da3b,0x01da6c},{0x01da75,0x01da75},{0x01da84,0x01da84},{0x01da9b,0x01da9f},{0x01daa1,0x01daaf},{0x01e000,0x01e006},
{0x01e008,0x01e018},{0x01e01b,0x01e021},{0x01e023,0x01e024},{0x01e026,0x01e02a},{0x01e130,0x01e136},{0x01e2ae,0x01e2ae},{0x01e2ec,0x01e2ef},{0x01e8d0,0x01e8d6},
{0x01e944,0x01e94a},{0x0e0001,0x0e0001},{0x0e0020,0x0e007f},{0x0e0100,0x0e01ef},
{0x00aaec,0x00aaed},{0x00aaf6,0x00aaf6},{0x00abe5,0x00abe5},{0x00abe8,0x00abe8},{0x00abed,0x00abed},{0x00d7b0,0x00d7c6},{0x00d7cb,0x00d7fb},{0x00fb1e,0x00fb1e},
{0x00fe00,0x00fe0f},{0x00fe20,0x00fe2f},{0x00feff,0x00feff},{0x00fff9,0x00fffb},{0x0101fd,0x0101fd},{0x0102e0,0x0102e0},{0x010376,0x01037a},{0x010a01,0x010a03},
{0x010a05,0x010a06},{0x010a0c,0x010a0f},{0x010a38,0x010a3a},{0x010a3f,0x010a3f},{0x010ae5,0x010ae6},{0x010d24,0x010d27},{0x010eab,0x010eac},{0x010f46,0x010f50},
{0x010f82,0x010f85},{0x011001,0x011001},{0x011038,0x011046},{0x011070,0x011070},{0x011073,0x011074},{0x01107f,0x011081},{0x0110b3,0x0110b6},{0x0110b9,0x0110ba},
{0x0110bd,0x0110bd},{0x0110c2,0x0110c2},{0x0110cd,0x0110cd},{0x011100,0x011102},{0x011127,0x01112b},{0x01112d,0x011134},{0x011173,0x011173},{0x011180,0x011181},
{0x0111b6,0x0111be},{0x0111c9,0x0111cc},{0x0111cf,0x0111cf},{0x01122f,0x011231},{0x011234,0x011234},{0x011236,0x011237},{0x01123e,0x01123e},{0x0112df,0x0112df},
{0x0112e3,0x0112ea},{0x011300,0x011301},{0x01133b,0x01133c},{0x011340,0x011340},{0x011366,0x01136c},{0x011370,0x011374},{0x011438,0x01143f},{0x011442,0x011444},
{0x011446,0x011446},{0x01145e,0x01145e},{0x0114b3,0x0114b8},{0x0114ba,0x0114ba},{0x0114bf,0x0114c0},{0x0114c2,0x0114c3},{0x0115b2,0x0115b5},{0x0115bc,0x0115bd},
{0x0115bf,0x0115c0},{0x0115dc,0x0115dd},{0x011633,0x01163a},{0x01163d,0x01163d},{0x01163f,0x011640},{0x0116ab,0x0116ab},{0x0116ad,0x0116ad},{0x0116b0,0x0116b5},
{0x0116b7,0x0116b7},{0x01171d,0x01171f},{0x011722,0x011725},{0x011727,0x01172b},{0x01182f,0x011837},{0x011839,0x01183a},{0x01193b,0x01193c},{0x01193e,0x01193e},
{0x011943,0x011943},{0x0119d4,0x0119d7},{0x0119da,0x0119db},{0x0119e0,0x0119e0},{0x011a01,0x011a0a},{0x011a33,0x011a38},{0x011a3b,0x011a3e},{0x011a47,0x011a47},
{0x011a51,0x011a56},{0x011a59,0x011a5b},{0x011a8a,0x011a96},{0x011a98,0x011a99},{0x011c30,0x011c36},{0x011c38,0x011c3d},{0x011c3f,0x011c3f},{0x011c92,0x011ca7},
{0x011caa,0x011cb0},{0x011cb2,0x011cb3},{0x011cb5,0x011cb6},{0x011d31,0x011d36},{0x011d3a,0x011d3a},{0x011d3c,0x011d3d},{0x011d3f,0x011d45},{0x011d47,0x011d47},
{0x011d90,0x011d91},{0x011d95,0x011d95},{0x011d97,0x011d97},{0x011ef3,0x011ef4},{0x013430,0x013438},{0x016af0,0x016af4},{0x016b30,0x016b36},{0x016f4f,0x016f4f},
{0x016f8f,0x016f92},{0x016fe4,0x016fe4},{0x01bc9d,0x01bc9e},{0x01bca0,0x01bca3},{0x01cf00,0x01cf2d},{0x01cf30,0x01cf46},{0x01d167,0x01d169},{0x01d173,0x01d182},
{0x01d185,0x01d18b},{0x01d1aa,0x01d1ad},{0x01d242,0x01d244},{0x01da00,0x01da36},{0x01da3b,0x01da6c},{0x01da75,0x01da75},{0x01da84,0x01da84},{0x01da9b,0x01da9f},
{0x01daa1,0x01daaf},{0x01e000,0x01e006},{0x01e008,0x01e018},{0x01e01b,0x01e021},{0x01e023,0x01e024},{0x01e026,0x01e02a},{0x01e130,0x01e136},{0x01e2ae,0x01e2ae},
{0x01e2ec,0x01e2ef},{0x01e8d0,0x01e8d6},{0x01e944,0x01e94a},{0x0e0001,0x0e0001},{0x0e0020,0x0e007f},{0x0e0100,0x0e01ef},
};
static constexpr const RangeLut RANGE_LUT_LIST[] = {
{-1, LUT_NONPRINTABLE, 1},
{ 2, LUT_2 , 122},
{ 0, LUT_0 , 348},
{ 0, LUT_0 , 350},
{ 1, nullptr , 1},
};
static constexpr const int RANGE_LUT_LIST_SIZE = 4;
......
000AD ; 1 # (­) Soft Hyphen (originally 0)
01160 ; 0 # (ᅠ) Hangul Jungseong Filler (originally 1)
01160..011FF ; 0 # (ᅟᅠ..ᅟᅠᇿ) Hangul Jamo Jungseong and Jongseong (originally 1)
0D7B0..0D7C6 ; 0 # (ᅟힰ..ᅟퟆ) Hangul Jamo Jungseong (complex vowels) for Old Korean (originally 1)
0D7CB..0D7FB ; 0 # (ᅟᅠퟋ..ᅟᅠퟻ) Hangul Jamo Jongseong (trailing consonants) for Old Korean (originally 1)
1F1E6..1F1FF ; 2 # (🇦..🇿) Regional indicators/flag codes (originally 1)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment