[23] UTF-16 は、 Unicode の符号化方式の1つです。
本項は歴史的事項を説明しています。本項の内容の一部または全部は、現在の状況とは異なるかもしれません。
(なお本項の内容の一部または全部は、互換性または歴史的連続性のために現在も有効な場合もあります。しかし新たに利用することは避けるべきです。)
[36] 既存のデータとの互換性のため、 Encoding Standard >>22 で UTF-16 の復号が規定されています。以前 >>35 は符号化も規定されていましたが、 Web互換性のためには不要であるとして、削除されました。
[21] Encoding Standard によれば、大エンディアンの UTF-16
の名前が UTF-16BE であり、ラベルとして utf-16be
を使って指定できます。また小エンディアンの UTF-16 の名前が UTF-16LE
であり、ラベルとして utf-16le
または
utf-16
を使って指定できます。
[24] HTML Standard は UTF-16BE
, UTF-16LE
, の総称を UTF-16 符号化としています >>25。utf-16
U+D800
から U+DFFF
までは表現できません。U-00110000
から先は表現できません。 (ISO/IEC 10646 には存在しますが、Unicode には存在しません。)U+0000
から U+FFFF
であるなら、その符号位置と同じ値の16ビット符号単位によって表現します。U+10000
から U+10FFFF
であるなら、[29] Web の文字コードは UTF-8 であり、 UTF-16 は使うべきではないとされています。
[30] ただし JavaScript や DOM は、歴史的理由により、文字列の表現に UTF-16 による16ビット符号単位を使っています。
[27] XML には UTF-16 に関する特別な規定がいくつもあります。 詳しくは XMLにおける文字コードを参照してください。
[37] UTF-16 は、 UCS-2 の16ビット平面ではすべての文字の符号化に十分でないことが明確になったとしてサロゲートペアが導入されたことにより登場しました。
[45] UTF-16の誕生 | yasuokaの日記 | スラド, https://srad.jp/~yasuoka/journal/387747/
[47] Wayback Machine, https://web.archive.org/web/20000821235014/http://www.unicode.org/Public/TEXT/ALLOC.TXT
In the ISO-IEC SC2/WG2 meetings where the current structure of the 10646 BMP was decided, there was discussion of the potential use of the O-Zone as a target zone for swapping in designated quarters of supplemental planes. The topic was however deferred, and no formal definition of such a regime was defined. The Japan national body negative vote on DIS 10646-1.2 explicitly requested that the O-Zone be expanded from 64 to 94 rows "for swapping-in the existing standards"; again no formal details were provided. In the absence of detailed proposals, general comments may be made on these two broad variants of the swap zone idea.
Considering the Japanese innovation first, this proposal to expand the O-Zone and swap in existing standards was explicitly rejected by WG2, because it is opposed to the basic intent of this standard, which is to assign a single code position to each graphical character, not to provide an indexing mechanism into existing standards. The expansion of the O-Zone to 94 rows is impossible in any case.
[48] 日本はこの段階でもまだ DIS 10646 みたいなのをぶっこもうとしてたのか、攻めてるなあw
[1] UTF-16 は、 ISO/IEC 10646 の附属書 C で規定されている UCS の符号化表現の一つです。
[2] 送信装置は、受信装置が UCS-2 しか解釈できない場合でも UTF-16 を送って構いません。 (C.7 参照。)
[3] C.7 は、 UTF-16/UCS-2 の実装を次のように分類しています。
(00 群 01 面以降を表す区点要素対の表示方法)
記号 | 知らない文字 | 知っている文字 | |
UCS-2の実装 | U | 〓〓 | − |
弱い実装 | W | 〓〓 | α |
中程度の強さの実装 | A | 〓 | α |
強い実装 | S | 〓 | α |
(αが 00 群 01 面以降にある知っている文字、 〓は知らない文字の代替表現とする。)
[5] 中程度の強さの実装と強い実装の違いはなんだ?
[43] UTF-16x (UTF-16 extension), Apr.30 1999, , http://hp.vector.co.jp/authors/VA002891/UTF16X.TXT
[15] RFC 2781 - UTF-16, an encoding of ISO 10646 ( ( 版)) http://tools.ietf.org/html/rfc2781
[19] RFC 3023 - XML Media Types ( 版) http://tools.ietf.org/html/rfc3023#section-2
[16] Web Applications 1.0 r6498 Clean up how we refer to UTF-16. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=6497&to=6498
[17] IRC logs: freenode / #whatwg / 20111226 ( ( 版)) http://krijnhoetmer.nl/irc-logs/whatwg/20111226#l-109
[18] [whatwg] [encoding] utf-16 ( ( 版)) http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2011-December/034260.html
[28] Describe the security situation around encodings and require browsers to... · 2e43ead · whatwg/encoding ( ( 版)) https://github.com/whatwg/encoding/commit/2e43ead5c796e314cd3aaada10a2dc33de7bfaf1#diff-8d4d847e6257b75f4bf8030496281de4R2632
[31] 24120 – The Encoding Standard only recognizes utf-16le and utf-16be. This should just refer to those if this is needed at all. ( 版) https://www.w3.org/Bugs/Public/show_bug.cgi?id=24120#c6
[33] Update integration with Encoding Standard · whatwg/html@6a31c26 ( 版) https://github.com/whatwg/html/commit/6a31c26cf12e39dab1a488e75dd56c03d6786d39
[34] Fix #18: remove UTF-16 support from TextEncoder · whatwg/encoding@8360f77 ( 版) https://github.com/whatwg/encoding/commit/8360f775c8df145f649047c7d59c5ff733ade112
[38] Editorial: check non-null before null (annevk著, ) https://github.com/whatwg/encoding/commit/4e53e160b9e0ade6e33a25d21580106a0db2c47f
[39] XLIFF Version 2.0 () http://docs.oasis-open.org/xliff/xliff-core/v2.0/os/xliff-core-v2.0-os.html#d0e15952