Network Working Group M. Crispin Request for Comments: 5051 University of Washington Category: Standards Track October 2007
i;unicode-casemap - Simple Unicode Collation Algorithm
Status of This Memo
このメモのステータス
This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.
この文書は、インターネットコミュニティのためのインターネット標準トラックプロトコルを指定し、改善のための議論と提案を要求します。このプロトコルの標準化状態と状態への「インターネット公式プロトコル標準」(STD 1)の最新版を参照してください。このメモの配布は無制限です。
Abstract
抽象
This document describes "i;unicode-casemap", a simple case-insensitive collation for Unicode strings. It provides equality, substring, and ordering operations.
「;ユニコード-CASEMAP i」は、Unicode文字列のための単純な大文字と小文字を区別しない照合をこの文書では説明しています。それは平等、ストリング、および注文操作を提供します。
The "i;ascii-casemap" collation described in [COMPARATOR] is quite simple to implement and provides case-independent comparisons for the 26 Latin alphabetics. It is specified as the default and/or baseline comparator in some application protocols, e.g., [IMAP-SORT].
「I; ASCII-CASEMAP」[コンパレータ]に記載の照合を実施するのは非常に簡単であり、26個のラテンアルファベットのためのケースに依存しない比較を提供します。これは、いくつかのアプリケーションプロトコルのデフォルト及び/又はベースライン比較器、例えば、[IMAP-SORT]として指定されています。
However, the "i;ascii-casemap" collation does not produce satisfactory results with non-ASCII characters. It is possible, with a modest extension, to provide a more sophisticated collation with greater multilingual applicability than "i;ascii-casemap". This extension provides case-independent comparisons for a much greater number of characters. It also collates characters with diacriticals with the non-diacritical character forms.
しかし、「I; ASCII-CASEMAP」の照合には、非ASCII文字で満足のいく結果が得られません。 「;アスキー・CASEMAP私は」それは控えめな拡張子を持つ、より大きな多言語適用性と、より洗練された照合を提供することが可能です。この拡張は、文字のはるかに大きい数の場合、独立した比較を提供します。また、非発音区別文字の形とdiacriticalsで文字を照合します。
This collation, "i;unicode-casemap", is intended to be an alternative to, and preferred over, "i;ascii-casemap". It does not replace the "i;basic" collation described in [BASIC].
この照合、 "I;ユニコードCASEMAP" は、 "私は、ASCII-CASEMAP" に代わることを意図し、より好ましいです。 [BASIC]で説明照合、それは「基本的な私」を置き換えるものではありません。
The "i;unicode-casemap" collation is a simple collation which is case-insensitive in its treatment of characters. It provides equality, substring, and ordering operations. The validity test operation returns "valid" for any input.
「私は、ユニコード-CASEMAP」の照合は大文字と小文字を区別しない文字のその治療である簡単な照合です。それは平等、ストリング、および注文操作を提供します。有効性のテスト動作は、任意の入力のための「有効」を返します。
This collation allows strings in arbitrary (and mixed) character sets, as long as the character set for each string is identified and it is possible to convert the string to Unicode. Strings which have an unidentified character set and/or cannot be converted to Unicode are not rejected, but are treated as binary.
この照合は、各文字列の文字セットが識別される限り、任意の(および混合)文字セット内の文字列を可能にし、Unicodeに文字列を変換することができます。正体不明の文字セットおよび/または拒否されていないUnicodeに変換することはできませんが、バイナリとして扱われていた文字列。
Each input string is prepared by converting it to a "titlecased canonicalized UTF-8" string according to the following steps, using UnicodeData.txt ([UNICODE-DATA]):
各入力文字列がいるUnicodeData.txt([UNICODE-DATA])を使用して、次の手順に従って「タイトルケース正規化UTF-8」という文字列に変換することによって調製されます。
(1) A Unicode codepoint is obtained from the input string.
(1)のUnicodeコードポイントは、入力文字列から得られます。
(a) If the input string is in a known charset that can be converted to Unicode, a sequence in the string's charset is read and checked for validity according to the rules of that charset. If the sequence is valid, it is converted to a Unicode codepoint. Note that for input strings in UTF-8, the UTF-8 sequence must be valid according to the rules of [UTF-8]; e.g., overlong UTF-8 sequences are invalid.
(b) If the input string is in an unknown charset, or an invalid sequence occurs in step (1)(a), conversion ceases. No further preparation is performed, and any partial preparation results are discarded. The original string is used unchanged with the i;octet comparator.
入力文字列が未知の文字セットである、または無効なシーケンスがステップで発生した場合(B)(1)(A)、変換が停止します。これ以上の準備は行われず、任意の部分的な準備の結果が破棄されます。オクテット比較器と、元の文字列は、私にそのまま使用されています。
(2) The following steps, using UnicodeData.txt ([UNICODE-DATA]), are performed on the resulting codepoint from step (1)(a).
(2)いるUnicodeData.txt([UNICODE-DATA])を使用して、次のステップは、(a)は、(1)工程で得られたコードポイント上で実行されます。
(a) If the codepoint has a titlecase property in UnicodeData.txt (this is normally the same as the uppercase property), the codepoint is converted to the codepoints in the titlecase property.
(b) If the resulting codepoint from (2)(a) has a decomposition property of any type in UnicodeData.txt, the codepoint is converted to the codepoints in the decomposition property. This step is recursively applied to each of the resulting codepoints until no more decomposition is possible (effectively Normalization Form KD).
得られたコードポイント(2)(a)にいるUnicodeData.txtにおける任意の型の分解性を有する場合(B)、コードポイントは、分解性のコードポイントに変換されます。これ以上の分解が(効果的に正規化形式KD)ことが可能であるなくなるまでこの手順は、再帰的に得られたコードポイントの各々に適用されます。
Example: codepoint U+01C4 (LATIN CAPITAL LETTER DZ WITH CARON) has a titlecase property of U+01C5 (LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON). Codepoint U+01C5 has a decomposition property of U+0044 (LATIN CAPITAL LETTER D) U+017E (LATIN SMALL LETTER Z WITH CARON). U+017E has a decomposition property of U+007A (LATIN SMALL LETTER Z) U+030c (COMBINING CARON). Neither U+0044, U+007A, nor U+030C have any decomposition properties. Therefore, U+01C4 is converted to U+0044 U+007A U+030C by this step.
例:コードポイントU + 01C4(キャロン付きラテンCAPITAL LETTER DZ)は(CARON WITH SMALL LETTERのZ付きラテン大文字D)U + 01C5のタイトルケース性を有します。コードポイントU + 01C5は、U + 0044(ラテン大文字D)U + 017E(キャロン付きラテン小文字Z)の分解性を有しています。 U + 017Eは、U + 007A(ラテン小文字Z)U + 030C(CARONを組み合わせる)の分解性を有しています。どちらのU + 0044、U + 007A、またU + 030Cは、任意の分解特性を持っています。したがって、U + 01C4は、このステップによってU + 0044 U + 007A U + 030Cに変換されます。
(3) The resulting codepoint(s) from step (2) is/are appended, in UTF-8 format, to the "titlecased canonicalized UTF-8" string.
(3)得られたコードポイント(複数可)工程から(2)/ "タイトルケース正規化UTF-8" の文字列に、UTF-8形式で、追加されています。
(4) Repeat from step (1) until there is no more data in the input string.
入力文字列にそれ以上データが存在しなくなるまで(4)(1)ステップから繰り返します。
Following the above preparation process on each string, the equality, ordering, and substring operations are as for i;octet.
各文字列で上記の製造過程に続いて、平等、発注、およびサブストリングの操作は私のためのようであり、オクテット。
It is permitted to use an alternative implementation of the above preparation process if it produces the same results. For example, it may be more convenient for an implementation to convert all input strings to a sequence of UTF-16 or UTF-32 values prior to performing any of the step (2) actions. Similarly, if all input strings are (or are convertible to) Unicode, it may be possible to use UTF-32 as an alternative to UTF-8 in step (3).
同じ結果を生成する場合は、上記製造方法の別の実装を使用することが許可されています。例えば、それは、前のステップ(2)のいずれかのアクションを実行するUTF-16またはUTF-32値のシーケンスにすべての入力文字列を変換するために実装するためのより便利であり得ます。同様に、すべての入力文字列がある(またはそれに変換可能な)場合のUnicodeは、ステップ(3)でUTF-8の代替としてUTF-32を使用することも可能です。
Note: UTF-16 is unsuitable as an alternative to UTF-8 in step (3), because UTF-16 surrogates will cause i;octet to collate codepoints U+E0000 through U+FFFF after non-BMP codepoints.
注:UTF-16がUTF-8ステップでの代替として不適当である(3)、UTF-16サロゲートは、Iを引き起こすであろうからである。オクテットが非BMPコードポイントの後にU + FFFFを介してコードポイントU + E0000を照合します。
This collation is not locale sensitive. Consequently, care should be taken when using OS-supplied functions to implement this collation. Functions such as strcasecmp and toupper are sometimes locale sensitive and may inconsistently casemap letters.
この照合は、敏感なロケールされていません。この照合を実装するためにOSが提供する機能を使用するときその結果、注意が必要です。このようstrcasecmpやTOUPPERなどの機能は、敏感なロケールと矛盾CASEMAP手紙をかもしれない時々あります。
The i;unicode-casemap collation is well suited to use with many Internet protocols and computer languages. Use with natural language is often inappropriate; even though the collation apparently supports languages such as Swahili and English, in real-world use it tends to mis-sort a number of types of string:
私は、ユニコード・CASEMAP照合は、多くのインターネット・プロトコルおよびコンピュータ言語で使用するのに適しています。自然言語を使用し、多くの場合は不適切です。照合は明らかに、このようなスワヒリ語や英語などの言語をサポートしているにもかかわらず、現実世界ではそれがミスソートに文字列の種類の数を傾向が使用します。
o people and place names containing scripts that are not collated according to "alphabetical order". o words with characters that have diacriticals. However, i;unicode-casemap generally does a better job than i;ascii-casemap for most (but not all) languages. For example, German umlaut letters will sort correctly, but some Scandinavian letters will not. o names such as "Lloyd" (which in Welsh sorts after "Lyon", unlike in English), o strings containing other non-letter symbols; e.g., euro and pound sterling symbols, quotation marks other than '"', dashes/hyphens, etc.
Oの人々と「アルファベット順」によると照合されていないスクリプトを含む地名。 diacriticalsを持つ文字と言葉O。しかし、私は、ASCII-CASEMAPほとんど(すべてではない)の言語について、ユニコード-CASEMAPは、一般的に私よりも良い仕事をしていません。たとえば、ドイツ語のウムラウト文字が正しく並べ替えますが、いくつかのスカンジナビアの手紙はしません。そのような「ロイド」としてO名その他の非文字記号を含む文字列O(英語とは異なり、「リヨン」後のウェールズ語種類で、)、;例えば、ユーロや英ポンド記号は、二重引用符は、ダッシュ/ハイフン、など「"」以外のマーク
<?xml version='1.0'?> <!DOCTYPE collation SYSTEM 'collationreg.dtd'> <collation rfc="5051" scope="global" intendedUse="common"> <identifier>i;unicode-casemap</identifier> <title>Unicode Casemap</title> <operations>equality order substring</operations> <specification>RFC 5051</specification> <owner>IETF</owner> <submitter>mrc@cac.washington.edu</submitter> </collation>
<?xmlのバージョン= '1.0'?> <DOCTYPE照合SYSTEM 'collationreg.dtd'!> <照合RFC = "5051" スコープ= "グローバル" intendedUse = "共通"> <識別子> I;ユニコード-CASEMAP </識別子</動作> <仕様> RFC 5051 </仕様> <所有者> IETF </所有者> <提出> mrc@cac.washington.edu </サブミッターをサブストリング> <タイトル>ユニコードCASEMAP </タイトル> <動作>等価順> </照合>
The security considerations for [UTF-8], [STRINGPREP], and [UNICODE-SECURITY] apply and are normative to this specification.
[UTF-8]、[STRINGPREP]、および[UNICODE-SECURITY]のためのセキュリティの考慮事項が適用され、この仕様書に規定されています。
The results from this comparator will vary depending upon the implementation for several reasons. Implementations MUST consider whether these possibilities are a problem for their use case:
このコンパレータからの結果は、いくつかの理由のための実装に応じて変化するであろう。実装は、これらの可能性は、それらを使用する場合の問題であるかどうかを検討する必要があります。
1) New characters added in Unicode may have decomposition or titlecase properties that will not be known to an implementation based upon an older revision of Unicode. This impacts step (2).
1)Unicodeで追加された新しい文字は、Unicodeの古いリビジョンに基づいて実装に知られることはありません分解やタイトルケースの特性を有することができます。この影響ステップ(2)。
2) Step (2)(b) defines a subset of Normalization Form KD (NFKD) that does not require normalization of out-of-order diacriticals. However, an implementation MAY use an NFKD library routine that does such normalization. This impacts step (2)(b) and possibly also step (1)(a), and is an issue only with ill-formed UTF-8 input.
2)工程(2)(b)は、アウト・オブ・オーダdiacriticalsの正規化を必要としない正規化形式KD(NFKD)のサブセットを定義します。しかし、実装は、このような正規化を行いNFKDライブラリルーチンを使用するかもしれません。この影響ステップは、(2)(B)および場合によってはまた、ステップ(1)(A)、および病気に形成されたUTF-8入力でのみ問題があります。
3) The set of charsets handled in step (1)(a) is open-ended. UTF-8 (and, by extension, US-ASCII) are the only mandatory-to-implement charsets. This impacts step (1)(a).
3)ステップで処理文字セットのセットは、(1)(a)は、オープンエンドです。 UTF-8(および、拡張によって、US-ASCIIは)のみ実装に必須の文字セットです。この影響の工程(1)(A)。
Implementations SHOULD, as far as feasible, support all the charsets they are likely to encounter in the input data, in order to avoid poor collation caused by the fall through to the (1)(b) rule.
実装は、限り可能、(1)(b)のルールに至るまで下落によって引き起こされる貧困層の照合を避けるために、彼らは、入力データに遭遇する可能性があるすべての文字セットをサポートする必要があります。
4) Other charsets may have revisions which add new characters that are not known to an implementation based upon an older revision. This impacts step (1)(a) and possibly also step (1)(b).
4)その他の文字セットは、古いリビジョンに基づいた実装に知られていない新しい文字を追加する改正を有することができます。この影響ステップは、(1)(a)およびおそらくはステップ(1)(B)。
An attacker may create input that is ill-formed or in an unknown charset, with the intention of impacting the results of this comparator or exploiting other parts of the system which process this input in different ways. Note, however, that even well-formed data in a known charset can impact the result of this comparator in unexpected ways. For example, an attacker can substitute U+0041 (LATIN CAPITAL LETTER A) with U+0391 (GREEK CAPITAL LETTER ALPHA) or U+0410 (CYRILLIC CAPITAL LETTER A) in the intention of causing a non-match of strings which visually appear the same and/or causing the string to appear elsewhere in a sort.
攻撃者は、この比較の結果に影響を与えるか、異なる方法でこの入力を処理するシステムの他の部分を利用することを意図して、形成された、病気または未知文字セットである入力を作成することができます。既知の文字セットであってもよく、形成されたデータが予期しない方法でこの比較の結果に影響を与えることができることは、注意してください。例えば、攻撃者が視覚的に表示される文字列の不一致を引き起こす意図にU + 0391(ギリシャ語CAPITAL LETTER ALPHA)またはU + 0410(CYRILLIC CAPITAL LETTER A)とU + 0041(ラテンCAPITAL LETTER A)を置き換えることができ同じおよび/またはソートの他の場所で表示される文字列を発生します。
The i;unicode-casemap collation defined in section 2 has been added to the registry of collations defined in [COMPARATOR].
I、セクション2で定義されたユニコードCASEMAP照合は[コンパレータ]で定義された照合のレジストリに追加されています。
[COMPARATOR] Newman, C., Duerst, M., and A. Gulbrandsen, "Internet Application Protocol Collation Registry", RFC 4790, February 2007.
[コンパレータ]ニューマン、C.、Duerst、M.、およびA. Gulbrandsenの、 "インターネットアプリケーションプロトコル照合レジストリ"、RFC 4790、2007年2月。
[STRINGPREP] Hoffman, P. and M. Blanchet, "Preparation of Internationalized Strings ("stringprep")", RFC 3454, December 2002.
【STRINGPREP]ホフマン、P.及びM.ブランシェ、 "国際化された文字列の調製(" 文字列準備 ")"、RFC 3454、2002年12月。
[UTF-8] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.
[UTF-8] Yergeau、F.、 "UTF-8、ISO 10646の変換フォーマット"、STD 63、RFC 3629、2003年11月。
[UNICODE-DATA] <http://www.unicode.org/Public/UNIDATA/ UnicodeData.txt>
[UNICODE-DATA <http://www.unicode.org/Public/UNIDATA/いるUnicodeData.txt>
Although the UnicodeData.txt file referenced here is part of the Unicode standard, it is subject to change as new characters are added to Unicode and errors are corrected in Unicode revisions. As a result, it may be less stable than might otherwise be implied by the standards status of this specification.
[UNICODE-SECURITY] Davis, M. and M. Suignard, "Unicode Security Considerations", February 2006, <http://www.unicode.org/reports/tr36/>.
[UNICODE-SECURITY]デイビス、M.とM. Suignard、 "Unicodeのセキュリティに関する考慮事項"、2006年2月、<http://www.unicode.org/reports/tr36/>。
[BASIC] Newman, C., Duerst, M., and A. Gulbrandsen, "i;basic - the Unicode Collation Algorithm", Work in Progress, March 2007.
[BASIC]ニューマン、C.、Duerst、M.、およびA. Gulbrandsenの、 "I;基本 - Unicode照合アルゴリズム"、進歩、2007年3月に作業。
[IMAP-SORT] Crispin, M. and K. Murchison, "Internet Message Access Protocol - SORT and THREAD Extensions", Work in Progress, September 2007.
[IMAP-SORT]クリスピン、M.とK.マーチソン、 "インターネットメッセージアクセスプロトコル - SORTとTHREAD拡張機能"、進歩、2007年9月での作業。
Author's Address
著者のアドレス
Mark R. Crispin Networks and Distributed Computing University of Washington 4545 15th Avenue NE Seattle, WA 98105-4527
マーク・R.クリスピン・ネットワークとワシントン4545の分散コンピューティング大学第15回アベニューNEシアトル、WA 98105から4527
Phone: +1 (206) 543-5762 EMail: MRC@CAC.Washington.EDU
電話:+1(206)543-5762 Eメール:MRC@CAC.Washington.EDU
Full Copyright Statement
完全な著作権声明
Copyright (C) The IETF Trust (2007).
著作権(C)IETFトラスト(2007)。
This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.
この文書では、BCP 78に含まれる権利と許可と制限の適用を受けており、その中の記載を除いて、作者は彼らのすべての権利を保有します。
This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
この文書とここに含まれている情報は、基礎とCONTRIBUTOR「そのまま」、ORGANIZATION HE / SHEが表すまたはインターネットSOCIETY、(もしあれば)を後援し、IETF TRUST ANDインターネットエンジニアリングタスクフォース放棄ALLに設けられています。保証は、明示または黙示、この情報の利用および特定目的に対する権利または商品性または適合性の黙示の保証を侵害しない任意の保証がこれらに限定されません。
Intellectual Property
知的財産
The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.
IETFは、本書またはそのような権限下で、ライセンスがたりないかもしれない程度に記載された技術の実装や使用に関係すると主張される可能性があります任意の知的財産権やその他の権利の有効性または範囲に関していかなる位置を取りません利用可能です。またそれは、それがどのような権利を確認する独自の取り組みを行ったことを示すものでもありません。 RFC文書の権利に関する手続きの情報は、BCP 78およびBCP 79に記載されています。
Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.
IPRの開示のコピーが利用できるようにIETF事務局とライセンスの保証に行われた、または本仕様の実装者または利用者がそのような所有権の使用のための一般的なライセンスまたは許可を取得するために作られた試みの結果を得ることができますhttp://www.ietf.org/iprのIETFのオンラインIPRリポジトリから。
The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.
IETFは、その注意にこの標準を実装するために必要とされる技術をカバーすることができる任意の著作権、特許または特許出願、またはその他の所有権を持ってすべての利害関係者を招待します。 ietf-ipr@ietf.orgのIETFに情報を記述してください。