GB 18030

GB 18030

[4] GB 18030 は、中華人民共和国で用いられている文字コードです。 文字集合としては Unicode と実質的に等しく、 符号化文字集合としては GB 2312GBK の拡張です。

符号構造

[38] いわゆるシフトJIS型で1バイトまたは2バイトの符号だった GBK に、4バイト符号を追加して拡張したものです。

[39] GBK の核となる部分は GB 2312とその拡張でした。 GBK の2バイト符号は当時の CJK統合漢字等を空き領域等に追加したものでした。 GB 18030 はそれに更に4バイト符号を追加して、 Unicode のすべての符号点をカバーするものでした。

[44] サロゲート符号点に相当するものはありません。 >>15

符号化文字集合

[42]符号Unicode との対応を示す形で規定されています。

[41] 0x80EURO SIGN とする実装と、 2バイト符号で EURO SIGN とする実装 (や正式規格) があります。

[43] 制定時点で Unicode にない (GBK の) 文字は PUA に割り当てられています。 >>36 規格の改定により正式な Unicode 符号点に(あれば)切り替えられています >>34 が、 それにより実装の違いが生じています。 >>15, >>45

[40] GB 18030 の符号構造上は存在するものの Unicode には対応付けられない未使用の4バイト符号の領域があります。 その一部は外字領域になっています。 >>15

GB 18030-2000

[7] 信息技朮 信息交換用漢字編碼字符集 基本集的拡充, Information technology - Chinese ideograms coded character set for information interchange - Extension for the basic set, 2000-03-17発布施行。

[5] 中華人民共和国では法的に GB 18030 の実装が義務付けられています (2001/9/1 より)。

[8]

中国政府が認可したビットマップフォント以外のビットマップフォントを搭載した文字 情報処理製品は、搭載されているビットマップフォントが、定められた字形との相違が 1書体(1サイズ)当たり0.1%以下でなくてはならない

[9] フォント作る人大変そう・・・。

当初の符号化文字集合

[10] 割当が差し替えられる前のもの。

  • 0x00-0x7F 単字節: ASCII
  • 0x80 単字節: U+20AC EURO SIGN
  • 0x8140-0xFEFE 双字節: GBK 1.0
  • 0x81308130-0x8439FE39 四字節: 双字節に含まれない BMP の文字、残りは保留
  • 0x85308130-0x8539FE39 四字節: 保留
  • 0x86308130-0x8F39FE39 四字節: 保留
  • 0x90308130-0xE339FE39 四字節: UCS 0x01面〜0x10面、残りは保留
  • 0xE4308130-0xFC39FE39 四字節: 保留
  • 0xFD308130-0xFE39FE39 四字節: 私用域

[46] 「規格票発行後」に変更 >>27 とかいう闇。 0x80 に注意 (>>41)。

解説サイト

[27] 漢字文献情報処理研究会: GB 18030関連情報, , http://web.archive.org/web/20050404225055/http://www.jaet.gr.jp/gb18030/

  • GB 18030規格票のドラフト(?)と思われるWordファイル

その変換テーブルには規格票発行後、大幅な変更が加えられた。改訂版の変換テーブルは、IBMによりXML形式で公開されている。

[37] >>27 この「ドラフト(?)」が >>10 の当初といわれていたもの。 規格票Internet Archive に現存せず。

IBM の XML というのが ICU に入っていたデータ。

[28] GB 18030: A mega-codepage, , http://web.archive.org/web/20050404130113/http://www-106.ibm.com/developerworks/library/u-china.html?dwzone=unicode

GB 18030-2005

[2] GB 18030 は2004年に改訂されて CJK統合漢字拡張B なども含むようになったそうです。 (2005年6月現在、 http://www.sac.gov.cn/ で検索しても 2000 としか出てませんが・・・。その 2000 も途中ですりかえられたわけで、 いいかげんなもんだ。)

[11] Bug 11837 – GB18030-2005 is not supported! ( ( 版)) http://sourceware.org/bugzilla/show_bug.cgi?id=11837

[35] Encoding Standard が対応しているのはこの版 (からの派生) です。


[119] IRGN2240EisoFeedback.pdf, , https://appsrv.cse.cuhk.edu.hk/~irg/irg/irg48/IRGN2240EisoFeedback.pdf

GB 18030-2005Unicode の字形差

GB 18030-2022

[30] 新版《信息技术 中文编码字符集》 强制性国家标准发布 - 电子信息产业网, 张维佳, 2022-07-28 22:38, , http://www.cena.com.cn/services/20220728/117048.html

[31] Ken Lunde 小林剣さんはTwitterを使っています: 「The long-awaited update to #GB18030 was released today as GB 18030-2022. The PUA and CJK Compatibility Ideograph requirements that affected 24 characters and 9 ideographs, respectively, has been lifted. Support for the 8,105 ideographs in #TGH2013 is a new requirement. (cont’d)」 / Twitter, 午前1:53 · 2022年7月29日 , https://twitter.com/ken_lunde/status/1552698695732187137

[32] The GB 18030-2022 Standard. By Dr Ken Lunde | by Dr Ken Lunde | Aug, 2022 | Medium, Dr Ken Lunde, https://ken-lunde.medium.com/the-gb-18030-2022-standard-3d0ebaeb4132

[33] 全国信息技术标准化网, , https://web.archive.org/web/20180814101211/http://nits.org.cn/getIndex.req?action=quary&req=modulenvpromote&id=3247&type=0&moduleId=83&sid=5

[34] 中文編碼網頁 → GB 18030 編碼表, , http://code.web.idv.hk/gb18030/gb18030.php

在2018年7月,全國信息技術標準化技術委員會擬製作新的 GB 18030 版本,相信最終本將稱為 GB 18030-2019,並計劃在2019年下半年發佈。

[19] If gb18030 is revised, consider aligning the Encoding Standard · Issue #27 · whatwg/encoding · GitHub, https://github.com/whatwg/encoding/issues/27

[87] 巫女锐评 GB 18030-2022 - 知乎, https://zhuanlan.zhihu.com/p/556647214

[102] L2/23-003 (Industry Recommendations for GB 18030 Testing & Certification) - 23003-gb18030-recommendations.pdf, , https://www.unicode.org/L2/L2023/23003-gb18030-recommendations.pdf

[100] L2/23-003R (Industry Recommendations for GB 18030 Testing & Certification) - 23003r-gb18030-recommendations.pdf, , https://www.unicode.org/L2/L2023/23003r-gb18030-recommendations.pdf

[101] >>100 元はと言えば GB 18030-2022非互換変更に元凶があるのだが、 往復変換を壊せと言っているこの提案も邪悪。 GB 18030 以外の PUA データが GB 18030 を経由した時、 今まで破壊されなかったケースも破壊されるような挙動を推奨している。

[98] Update GB-18030 encoding table by achristensen07 · Pull Request #14716 · WebKit/WebKit · GitHub, https://github.com/WebKit/WebKit/pull/14716

[99] Reflect changes in GB 18030-2022 · Issue #312 · whatwg/encoding · GitHub, https://github.com/whatwg/encoding/issues/312

[104] しかし >>98 が許されるなら令和元号合字シフトJISにねじ込んで良かったんじゃないかという気が...

[103] Adobe-GB1-6

[108] どうでもいいけど GB 18030-2022ISO-2022 ぽい名前やな。これが令和ISO 2022 か。

[116] null, , https://www.babelstone.co.uk/CJK/IDS.TXT

[117] >>116 によると GB 18030-2022字形Unicode出典Gと違う字形のことがあるらしい。

[118] 全国信息技术标准化网 - 信标委NITS, http://www.nits.org.cn/index/article/4034

GB 18030-2022 の部分改正

[78] 国家标准计划 - 全国标准信息公共服务平台, https://std.samr.gov.cn/gb/search/gbDetailed?id=E99F696149DE5D5DE05397BE0A0A2787

[77] U+A0000 からの領域 (Unicode では未割当) が使われています >>76 Unicode非互換割当

[80] Microsoft Word - IRGN2592ChinaActivityReportIRG60 - IRGN2592.pdf, , https://appsrv.cse.cuhk.edu.hk/~irg/irg/irg60/IRGN2592.pdf

[81] Draft GB 18030-2022 Amendment Feedback & Recommendations (SC2 N4834 | WG2 N5201 | IRG N2591 | L2/23-057) - 23057-gb18030-amendment-feedback.pdf, , https://www.unicode.org/L2/L2023/23057-gb18030-amendment-feedback.pdf

[85] Microsoft Word - GB18030-2022修改单(二次公示稿)2023-03-31.docx - 23100-gb18030-2022-amd-draft2.pdf, , https://www.unicode.org/L2/L2023/23100-gb18030-2022-amd-draft2.pdf

[84] L2/23-082 (CJK & Unihan Group Recommendations for UTC #175 Meeting) - 23082-cjk-unihan-group-utc175.pdf, , https://www.unicode.org/L2/L2023/23082-cjk-unihan-group-utc175.pdf#page=2

[86] >>84 強気に出れば UTC が折れてくれるのか...

[88] L2/23-106 (Proposal to provisionally assign or accept 603 urgently-needed ideographs; WG2 N5214) - 23106-unc-extension-i.pdf, , https://www.unicode.org/L2/L2023/23106-unc-extension-i.pdf

[89] Ken Lunde 小林剣さんはTwitterを使っています: 「L2/23-106, “Proposal to provisionally assign or accept 603 urgently-needed ideographs,” was silently updated today to correct two glyphs and to reorder the repertoire. #UTC175 #ExtensionI #CJK统一汉字 #扩充I #CJK統合漢字 #拡張I https://t.co/uzXOjpuq41 https://t.co/p79NCiRohY」 / Twitter, , https://twitter.com/ken_lunde/status/1650716585521451009

[90] 中国人を悩ませるレアな名字の文字コード問題 - ZDNET Japan, 山谷剛史, 2023-05-31 07:00, https://japan.zdnet.com/article/35204430/

中国では、2023年8月1日に強制力のある国家標準規格「GB 18030-2022」(信息技術中文編碼字符集)が施行される。

国際規格「Unicode」に新しく漢字が追加されるには長い時間がかかる。そこで、まずは2023年8月をめどに強制性国家標準で、漢字やチベット文字など少数民族の文字を含めて登録し、中国国内で利用する文字コードを共通化することで、長年抱えていたデジタル化の問題を解決するというわけだ。

では、中国全土の都市から農村、沿岸部から内陸に至るまで、どうやって探し出すのか。動画などのコンテンツに強い騰訊(テンセント)が、前述の少数民族リス族のニャ姓に関するエピソードを発信・拡散させている。同社が提供する中国語の入力システム(IME)「捜狗」(ソーゴウ)に文字を手書き入力する登録フォームも用意した。

確かに役所が主導するよりも、「WeChat」(ウィーチャット)やコンテンツ、ゲームに強い同社の方が認知度を高められそうだ。8月の施行までに外字を中国全土でどれだけ探し尽くせるか、その手腕が問われる。

[91] 8月施行なのにまだ探してる? ちょっと意味がわからない。次の次の改正向けの話? また別の話?

[92] 山谷剛史 中国アジアITライター&異国飯さんはTwitterを使っています: 「上海とかでは外字でフォローしている。ただ中国役所あるあるで、部署ごとの連帯がなってないからマイナンバーカードのようなスマート化デジタル化をすると、繋がったサービスで文字は同じだけどコードが異なりエラーを出すw https://t.co/m2lRDotHrI」 / Twitter, , https://twitter.com/YamayaT/status/1663694075982393345

[93] >>92 の画像は U+4DAE と U+E863 で、これは GBK の時代?の PUA がまだ使われているという話。

[94] 未だに >>93 が問題になるなら、そりゃあ U+Ahhhh の謎の空き領域を埋めたくなるよねえw

[95] The Unicode Blog: Unicode 15.1 Beta Review Open, , https://blog.unicode.org/2023/05/unicode-151-beta-review-open.html

China has a very urgent need for encoding of certain CJK ideographs used in public services databases. To accommodate this urgent need, the Unicode Technical Committee (UTC) decided at its April 2023 meeting to encode 603 new characters in Unicode 15.1 as CJK Unified Ideographs Extension I. This new block is included in the delta charts for the Unicode 15.1 beta. However, inclusion of these characters in Unicode 15.1 is contingent on support for this addition from China, and on support for this addition in the corresponding ISO/IEC 10646 standard from ISO/IEC JTC 1/SC 2 at their upcoming meeting in June. While support for the new block is anticipated, there is a small chance that minor changes to this repertoire will be made after the beta, or that UTC will pull this block entirely from the 15.1 release.

While draft content for the beta has been published as of May 23rd, the work groups preparing updates to the content could continue to make changes to data or specs during the Beta review period. Any substantive changes for the beta will be frozen by June 5th.

[96] 令和元号合字追加のときに世界に迷惑かけるなとか意味わからないこと日本国内でグダグダ言ってた人達みてる~!? 世界に迷惑かけるっていうのはこういうことだよ。

[97] n5222_USNB-Comments-on-Draft-2-of-GB 18030-2022-Amendment-1.pdf, , https://www.unicode.org/wg2/docs/n5222_USNB-Comments-on-Draft-2-of-GB%2018030-2022-Amendment-1.pdf

[105] Ken Lunde 小林剣さんはTwitterを使っています: 「Based on feedback received from China on 2023-06-30 about #ExtensionI per SC 2 Resolution M 28-05, the repertoire will grow to 622 ideographs in the range U+2EBF0..U+2EE5D. #UTC176 https://t.co/G1xe6I5afz」 / Twitter, , https://twitter.com/ken_lunde/status/1675136495441838080

[107] 23154-n5238-unc-china.pdf, , https://www.unicode.org/L2/L2023/23154-n5238-unc-china.pdf

[110] 23088-irgn2605-irg60-misc-report.pdf, , https://www.unicode.org/L2/L2023/23088-irgn2605-irg60-misc-report.pdf

[109] Universal Multiple-Octet Coded Character Set - 23145-n5234-wg2-m70-recs.pdf, , https://www.unicode.org/L2/L2023/23145-n5234-wg2-m70-recs.pdf

[111] グループ:GB18030-2022ドラフト - GlyphWiki, https://glyphwiki.org/wiki/Group:GB18030-2022%e3%83%89%e3%83%a9%e3%83%95%e3%83%88

[112] Microsoft Word - Unicode Conformance Model House Cleaning.docx - 23192-conformance-model-house-cleaning.pdf, , https://www.unicode.org/L2/L2023/23192-conformance-model-house-cleaning.pdf#page=4

[113] >>112 関係あるのかないのかしらないが草なんだぜ

[120] Microsoft Word - IRGN2623ChinaActivityReportIRG61 - 23240-irgn2623-china-ar.pdf, , https://www.unicode.org/L2/L2023/23240-irgn2623-china-ar.pdf

[123] <4D6963726F736F667420576F7264202D20474231383033302D32303232B5DA31BAC5D0DEB8C4B5A5D5F7C7F3D2E2BCFBA3A8D7AA706466C8FDB4CEB9ABCABED3C3A3A9323032332D31312D3039D7AA5044462E646F6378> - 23271-gb18030-2022-amd-draft3.pdf, , https://www.unicode.org/L2/L2023/23271-gb18030-2022-amd-draft3.pdf

[130] IRGN2638TheFinalVersion&ThePropertyValueOfExt.I.pdf, , https://appsrv.cse.cuhk.edu.hk/~irg/irg/irg61/IRGN2638TheFinalVersion&ThePropertyValueOfExt.I.pdf

[131] IRGN2635_HorizontalExtension.pdf, , https://appsrv.cse.cuhk.edu.hk/~irg/irg/irg61/IRGN2635_HorizontalExtension.pdf#page=5

[132] >>131 台湾日本が過去に提案したときは既存符号位置統合されて却下されていたものが中華人民共和国のゴリ押しで Unicode に追加された事案 (>>131 の当時と少しずれて今は U+2EDE0)。

フォント規格

[57] GB 19966-2005, GB∕T 19966-2019フォント

[73] 新版前書きによると版では誤字の修正と文字の追加があったようです。 >>72

[58] GNU Unifont Glyphs, , https://unifoundry.com/unifont/

Qianqian states in the Unibit distribution: "The entire CJK Unified Ideographics (U4E00-U9FA5) and CJK Unified Ideographics Extension A(U3400-U4DB5) blocks were replaced by high-quality glyphs from China National Standard GB19966-2005 (public domain)."

[114] Habitat: Unibit README, http://wenq.org/wqy2/index.cgi?Unibit_README

The entire CJK Unified Ideographics (U4E00-U9FA5) and CJK Unified Ideographics Extension A(U3400-U4DB5) blocks were replaced by high-quality glyphs from China National Standard GB19966-2005 (public domain).

[115] Habitat: Unibit, http://wenq.org/wqy2/index.cgi?Unibit


[59] GB 19967.1-2005, GB/T 19967.2-2010, GB/T 19967.1-2019, GB/T 19967.2-2019漢字フォント

[63] 新版前書きによると版では文字の追加があったようです。 >>62, >>61


[47] GB/T 22320-2008, その改定 GB/T 22320-2019, GB/T 22321.1-2008, その改定 GB/T 22321.1-2018, GB/T 22322.1-2008, その改定 GB/T 22322.1-2019 は、 GB 18030フォントを定めるものです。

[49] /版は版に対して追加と削除があると新版前書きにかかれています >>54, >>48, >>55

[51] >>50

2009-07-01实施 根据2017年第7号公告和强制性标准整合精简结论,自2017年3月23日起,该标准转化为推荐性标准,不再强制执行。

[52] >>48

实施日期 2019-01-01

[53] 关注新版GB 18030(未竟) - 知乎, https://zhuanlan.zhihu.com/p/50786851


[64] GB/T 25899.1-2010, GB/T 25899.1-2019, GB/T 25899.2-2010, GB/T 25899.2-2019

[65] 新版前書きによると版では文字の追加があったようです。 >>65


[69] GB/T 30878-2014, GB/T 30878-2019, GB/T 30879.1-2014, GB/T 30879.1-2019, GB/T 30879.2-2014, GB/T 30879.2-2019

[70] 新版前書きによると版では誤字の修正と文字の追加があったようです。 >>68, >>74, >>71

エスケープシーケンス

ANSIエスケープシーケンス

DOCS

Unicode PUA

[56] 03411-gbhkscs.pdf, , https://www.unicode.org/L2/L2003/03411-gbhkscs.pdf

[121] source-han-sans/Resources/utf32-gb18030pua24.map at release · adobe-fonts/source-han-sans · GitHub, https://github.com/adobe-fonts/source-han-sans/blob/release/Resources/utf32-gb18030pua24.map

メモ

[60] 关于召开GB 18030等5项中文信息技术强制性国家标准宣贯会的会议通知, 全国信标委, , https://mp.weixin.qq.com/s/1umhs7uQM0ZOOPKbGZSXhw

[6] 92806 – need to support GB18030 in universal detector ( ( 版)) https://bugzilla.mozilla.org/show_bug.cgi?id=92806

[13] IRC logs: freenode / #whatwg / 20131216 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20131216#l-291

[14] IRC logs: freenode / #whatwg / 20131218 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20131218#l-470

[15] GB 18030 - Wikipedia, the free encyclopedia ( ( 版)) http://en.wikipedia.org/wiki/GB_18030

[16] Turn gb18030 into a real UTF and make gbk et al labels for it. https://w... · 182ad9e · whatwg/encoding ( ( 版)) https://github.com/whatwg/encoding/commit/182ad9e607a7c6f0fa51d9dd6c638edaa5ec59fd

[17] gb18030 is returned lowercase · dd172fa · whatwg/dom ( ( 版)) https://github.com/whatwg/dom/commit/dd172fa5f8c2fc82d0c66b7f9305fd59666c95ba

[18] Bug 28740 – GB18030-2000 and GB18030-2005 : Decide what to do about their differences ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=28740

[20] gb18030, shift_is, euc-kr: put byte back if code point is null (not p… · whatwg/encoding@640bf69 ( 版) https://github.com/whatwg/encoding/commit/640bf69847a17fd98df027fd6cd5ae384ac82dab

[21] Indicate that we follow GB18030-2000. Fixes https://www.w3.org/Bugs/P… · whatwg/encoding@257aa5b ( 版) https://github.com/whatwg/encoding/commit/257aa5b64f5ccae76b8ed20d87cc2895deb17f0a

[22] Remove the last 14 characters PUA of GB18030-2005 · Issue #27 · whatwg/encoding () https://github.com/whatwg/encoding/issues/27

[23] Document minimal implementation requirements (annevk著, ) https://github.com/whatwg/encoding/commit/9323530fae940d95b2c0b9f00a6a654bd2097aff

[122] Mapping changes for different versions of GB 18030 · Issue #I65U2Z · Eiso Chan/irg - Gitee, https://gitee.com/eisoch/irg/issues/I65U2Z