RFC3492 日本語訳

3492 Punycode: A Bootstring encoding of Unicode for InternationalizedDomain Names in Applications (IDNA). A. Costello. March 2003. (Format: TXT=67439 bytes) (Status: PROPOSED STANDARD)
プログラムでの自動翻訳です。
RFC一覧
英語原文

Network Working Group                                        A. Costello
Request for Comments: 3492                 Univ. of California, Berkeley
Category: Standards Track                                     March 2003

コメントを求めるワーキンググループA.コステロ要求をネットワークでつないでください: 3492年のカリフォルニア、バークレーカテゴリの大学: 2003年の標準化過程行進

              Punycode: A Bootstring encoding of Unicode
       for Internationalized Domain Names in Applications (IDNA)

Punycode: ApplicationsのInternationalized Domain Namesのためにユニコードをコード化するBootstring(IDNA)

Status of this Memo

この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.

このドキュメントは、インターネットコミュニティにインターネット標準化過程プロトコルを指定して、改良のために議論と提案を要求します。 このプロトコルの標準化状態と状態への「インターネット公式プロトコル標準」(STD1)の現行版を参照してください。 このメモの分配は無制限です。

Copyright Notice

版権情報

   Copyright (C) The Internet Society (2003).  All Rights Reserved.

Copyright(C)インターネット協会(2003)。 All rights reserved。

Abstract

要約

   Punycode is a simple and efficient transfer encoding syntax designed
   for use with Internationalized Domain Names in Applications (IDNA).
   It uniquely and reversibly transforms a Unicode string into an ASCII
   string.  ASCII characters in the Unicode string are represented
   literally, and non-ASCII characters are represented by ASCII
   characters that are allowed in host name labels (letters, digits, and
   hyphens).  This document defines a general algorithm called
   Bootstring that allows a string of basic code points to uniquely
   represent any string of code points drawn from a larger set.
   Punycode is an instance of Bootstring that uses particular parameter
   values specified by this document, appropriate for IDNA.

Punycodeは使用のためにApplications(IDNA)のInternationalized Domain Namesと共に設計された構文をコード化する簡単で効率的な転送です。 それは唯一、reversiblyにユニコードストリングをASCIIストリングに変えます。 ユニコードストリングのASCII文字は文字通り代理をされます、そして、非ASCII文字はホスト名ラベル(手紙、ケタ、およびハイフン)に許容されているASCII文字によって代理をされます。 このドキュメントは一連の基本コードポイントにより大きいセットから得られたコード・ポイントのどんなストリングも唯一表させるBootstringと呼ばれる一般的なアルゴリズムを定義します。 PunycodeはIDNAに、適切なこのドキュメントによって指定された特定のパラメタ値を使用するBootstringの例です。

Table of Contents

目次

   1. Introduction...............................................2
       1.1 Features..............................................2
       1.2 Interaction of protocol parts.........................3
   2. Terminology................................................3
   3. Bootstring description.....................................4
       3.1 Basic code point segregation..........................4
       3.2 Insertion unsort coding...............................4
       3.3 Generalized variable-length integers..................5
       3.4 Bias adaptation.......................................7
   4. Bootstring parameters......................................8
   5. Parameter values for Punycode..............................8
   6. Bootstring algorithms......................................9

1. 序論…2 1.1 特集します。2 プロトコル一部の1.2相互作用…3 2. 用語…3 3. 記述をBootstringします…4 3.1 基本コードポイント隔離…4 3.2 挿入「非-種類」のコード化…4 3.3は可変長の整数を一般化しました…5 3.4 適合に偏ってください…7 4. パラメタをBootstringします…8 5. Punycodeのためのパラメタ値…8 6. アルゴリズムをBootstringします…9

Costello                    Standards Track                     [Page 1]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[1ページ]。

       6.1 Bias adaptation function.............................10
       6.2 Decoding procedure...................................11
       6.3 Encoding procedure...................................12
       6.4 Overflow handling....................................13
   7. Punycode examples.........................................14
       7.1 Sample strings.......................................14
       7.2 Decoding traces......................................17
       7.3 Encoding traces......................................19
   8. Security Considerations...................................20
   9. References................................................21
       9.1 Normative References.................................21
       9.2 Informative References...............................21
   A. Mixed-case annotation.....................................22
   B. Disclaimer and license....................................22
   C. Punycode sample implementation............................23
   Author's Address.............................................34
   Full Copyright Statement.....................................35

6.1 適合機能に偏ってください…10 6.2 手順を解読します…11 6.3 手順をコード化します…12 6.4 取り扱いから、はみ出してください…13 7. Punycodeの例…14 7.1 ストリングを抽出してください…14 7.2 跡を解読します…17 7.3 跡をコード化します…19 8. セキュリティ問題…20 9. 参照…21 9.1 標準の参照…21 9.2 有益な参照…21 A.Mixedケース注釈…22のB.注意書きとライセンス…22 C.Punycodeは実現を抽出します…23作者のアドレス…34 完全な著作権宣言文…35

1. Introduction

1. 序論

   [IDNA] describes an architecture for supporting internationalized
   domain names.  Labels containing non-ASCII characters can be
   represented by ACE labels, which begin with a special ACE prefix and
   contain only ASCII characters.  The remainder of the label after the
   prefix is a Punycode encoding of a Unicode string satisfying certain
   constraints.  For the details of the prefix and constraints, see
   [IDNA] and [NAMEPREP].

[IDNA]は、国際化ドメイン名を支持するために構造について説明します。 ACEラベルは非ASCII文字を含むラベルを表すことができます。(ラベルは、特別なACE接頭語で始まって、ASCII文字だけを含みます)。 接頭語がPunycodeになったユニコードをコード化する後にラベルの残りは満足のいったある規制を結びます。 接頭語と規制の詳細に関しては、[IDNA]と[NAMEPREP]を見てください。

   Punycode is an instance of a more general algorithm called
   Bootstring, which allows strings composed from a small set of "basic"
   code points to uniquely represent any string of code points drawn
   from a larger set.  Punycode is Bootstring with particular parameter
   values appropriate for IDNA.

Punycodeは小さい「基本的な」コード・ポイントから構成されたストリングにより大きいセットから得られたコード・ポイントのどんなストリングも唯一表させるBootstringと呼ばれるより一般的なアルゴリズムの例です。 PunycodeはIDNAに、適切な特定のパラメタ値があるBootstringです。

1.1 Features

1.1 特徴

   Bootstring has been designed to have the following features:

Bootstringは以下の特徴を持つように設計されています:

   *  Completeness:  Every extended string (sequence of arbitrary code
      points) can be represented by a basic string (sequence of basic
      code points).  Restrictions on what strings are allowed, and on
      length, can be imposed by higher layers.

* 完全性: 基本的なストリング(基本コードポイントの系列)で、あらゆる拡張ストリング(勝手な規準ポイントの系列)を表すことができます。 より高い層でどんなストリングが許容されているかの上と、そして、長さにおける制限を課すことができます。

   *  Uniqueness:  There is at most one basic string that represents a
      given extended string.

* ユニークさ: 最も1つに、与えられた拡張ストリングを表す基本的なストリングがあります。

   *  Reversibility:  Any extended string mapped to a basic string can
      be recovered from that basic string.

* リバーシブル: 基本的なストリングに写像されたどんな拡張ストリングからもその基本的なストリングを取り戻すことができます。

Costello                    Standards Track                     [Page 2]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[2ページ]。

   *  Efficient encoding:  The ratio of basic string length to extended
      string length is small.  This is important in the context of
      domain names because RFC 1034 [RFC1034] restricts the length of a
      domain label to 63 characters.

* 効率的なコード化: 基本的なストリング長対拡張ストリング長の比率はわずかです。 RFC1034[RFC1034]がドメインラベルの長さを63のキャラクタに制限するので、これはドメイン名の文脈で重要です。

   *  Simplicity:  The encoding and decoding algorithms are reasonably
      simple to implement.  The goals of efficiency and simplicity are
      at odds; Bootstring aims at a good balance between them.

* 簡単さ: コード化とアルゴリズムを解読するのは実行するのが合理的に簡単です。 効率と簡単さの目標は不和です。 Bootstringはそれらの間の良いバランスを目的とします。

   *  Readability:  Basic code points appearing in the extended string
      are represented as themselves in the basic string (although the
      main purpose is to improve efficiency, not readability).

* 読み易さ: 拡張ストリングに現れる基本コードポイントは自分たちとして基本的なストリングに表されます(主な目的が読み易さではなく、効率を高めることですが)。

   Punycode can also support an additional feature that is not used by
   the ToASCII and ToUnicode operations of [IDNA].  When extended
   strings are case-folded prior to encoding, the basic string can use
   mixed case to tell how to convert the folded string into a mixed-case
   string.  See appendix A "Mixed-case annotation".

また、Punycodeは[IDNA]のToASCIIとToUnicode操作で使用されない付加的な機能を支持できます。 拡張ストリングがコード化の前にケースによって折り重ねられるとき、基本的なストリングは、複雑なケースストリングに折り重ねられたストリングを変換する方法を教えるのに複雑なケースを使用できます。 付録A「Mixedケース注釈」を見てください。

1.2 Interaction of protocol parts

1.2 プロトコル一部の相互作用

   Punycode is used by the IDNA protocol [IDNA] for converting domain
   labels into ASCII; it is not designed for any other purpose.  It is
   explicitly not designed for processing arbitrary free text.

IDNAプロトコル[IDNA]によってPunycodeはドメインラベルをASCIIに変換するのに使用されます。 それはいかなる他の目的のためにも設計されていません。 それは、任意の無料のテキストを処理するように明らかに設計されていません。

2. Terminology

2. 用語

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
   document are to be interpreted as described in BCP 14, RFC 2119
   [RFC2119].

キーワード“MUST"、「必須NOT」が「必要です」、“SHALL"、「」、“SHOULD"、「「推薦され」て、「5月」の、そして、「任意」のNOTはBCP14RFC2119[RFC2119]で説明されるように本書では解釈されることであるべきです。

   A code point is an integral value associated with a character in a
   coded character set.

コード・ポイントはコード化文字集合でキャラクタに関連している整数値です。

   As in the Unicode Standard [UNICODE], Unicode code points are denoted
   by "U+" followed by four to six hexadecimal digits, while a range of
   code points is denoted by two hexadecimal numbers separated by "..",
   with no prefixes.

「ユニコードコード・ポイントはユニコードStandard[ユニコード]のように4〜6つの16進数字があとに続いた「U+」によって指示されます、さまざまなコード・ポイントが切り離された2つの16進数によって指示されますが」」, 接頭語なしで。

   The operators div and mod perform integer division; (x div y) is the
   quotient of x divided by y, discarding the remainder, and (x mod y)
   is the remainder, so (x div y) * y + (x mod y) == x.  Bootstring uses
   these operators only with nonnegative operands, so the quotient and
   remainder are always nonnegative.

オペレータdivとモッズは整数分割を実行します。 (x div y) 残りを捨てて、yはxに関する商に割られます、そして、(xモッズ風のy)は残りであり、そう(x div y)は*y+(xモッズy)=xです。 Bootstringが非負のオペランドだけと共にこれらのオペレータを使用するので、商と残りはいつも非負です。

   The break statement jumps out of the innermost loop (as in C).

中断声明は最も奥深い輪から飛び出ます(Cのように)。

Costello                    Standards Track                     [Page 3]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[3ページ]。

   An overflow is an attempt to compute a value that exceeds the maximum
   value of an integer variable.

オーバーフローは整数変数の最大値を超えている値を計算する試みです。

3. Bootstring description

3. 記述をBootstringします。

   Bootstring represents an arbitrary sequence of code points (the
   "extended string") as a sequence of basic code points (the "basic
   string").  This section describes the representation.  Section 6
   "Bootstring algorithms" presents the algorithms as pseudocode.
   Sections 7.1 "Decoding traces" and 7.2 "Encoding traces" trace the
   algorithms for sample inputs.

基本コードの系列が(「基本的なストリング」)を指すとき、Bootstringはコード・ポイント(「拡張ストリング」)の気紛れな順番を表します。 このセクションは表現について説明します。 セクション6 「Bootstringアルゴリズム」は擬似コードとしてアルゴリズムを提示します。 セクション7.1 「跡を解読します」と7.2「コード化跡」がサンプル入力のためのアルゴリズムをたどります。

   The following sections describe the four techniques used in
   Bootstring.  "Basic code point segregation" is a very simple and
   efficient encoding for basic code points occurring in the extended
   string: they are simply copied all at once.  "Insertion unsort
   coding" encodes the non-basic code points as deltas, and processes
   the code points in numerical order rather than in order of
   appearance, which typically results in smaller deltas.  The deltas
   are represented as "generalized variable-length integers", which use
   basic code points to represent nonnegative integers.  The parameters
   of this integer representation are dynamically adjusted using "bias
   adaptation", to improve efficiency when consecutive deltas have
   similar magnitudes.

以下のセクションはBootstringで使用される4つのテクニックについて説明します。 「基本コードポイント隔離」は拡張ストリングに起こる基本コードポイントのための非常に簡単で効率的なコード化です: それらは単に一気にコピーされます。 「挿入「非-種類」のコード化」は、デルタとして非基本コードポイントをコード化して、より小さいデルタを通常もたらす外観の順にというよりむしろ番号でコード・ポイントを処理します。 「一般化された可変長の整数」(基本コードを使用する)が非負整数を表すために指すとき、デルタは表されます。 この整数表現のパラメタは、連続したデルタに同様の大きさがあるとき、能率を増進するのに「バイアス適合」を使用することでダイナミックに調整されます。

3.1 Basic code point segregation

3.1 基本コードポイント隔離

   All basic code points appearing in the extended string are
   represented literally at the beginning of the basic string, in their
   original order, followed by a delimiter if (and only if) the number
   of basic code points is nonzero.  The delimiter is a particular basic
   code point, which never appears in the remainder of the basic string.
   The decoder can therefore find the end of the literal portion (if
   there is one) by scanning for the last delimiter.

拡張ストリングに現れるすべての基本コードポイントが文字通り基本的なストリングの始めに表されます、デリミタがあとに続いたそれらの最初の注文で(唯一、)、基本コードポイントの数は非零です。 デリミタは特定の基本コードポイントです。(そのポイントは基本的なストリングの残りに決して現れません)。 したがって、最後のデリミタのためにスキャンすることによって、デコーダは文字通りの部分(1つがあれば)の端に当たることができます。

3.2 Insertion unsort coding

3.2 挿入「非-種類」のコード化

   The remainder of the basic string (after the last delimiter if there
   is one) represents a sequence of nonnegative integral deltas as
   generalized variable-length integers, described in section 3.3.  The
   meaning of the deltas is best understood in terms of the decoder.

基本的なストリング(そこであるなら最後のデリミタが1になった後に)の残りはセクション3.3で説明された一般化された可変長の整数として非負の不可欠のデルタの系列を表します。 デルタの意味はデコーダに関して特に理解されています。

   The decoder builds the extended string incrementally.  Initially, the
   extended string is a copy of the literal portion of the basic string
   (excluding the last delimiter).  The decoder inserts non-basic code
   points, one for each delta, into the extended string, ultimately
   arriving at the final decoded string.

デコーダは拡張ストリングを増加して造ります。 初めは、拡張ストリングは基本的なストリング(最後のデリミタを除いた)の文字通りの部分のコピーです。 デコーダは非基本コードポイントを挿入します、各デルタあたり1つ、拡張ストリングに、結局最終的な解読されたストリングに到着して。

Costello                    Standards Track                     [Page 4]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[4ページ]。

   At the heart of this process is a state machine with two state
   variables: an index i and a counter n.  The index i refers to a
   position in the extended string; it ranges from 0 (the first
   position) to the current length of the extended string (which refers
   to a potential position beyond the current end).  If the current
   state is <n,i>, the next state is <n,i+1> if i is less than the
   length of the extended string, or <n+1,0> if i equals the length of
   the extended string.  In other words, each state change causes i to
   increment, wrapping around to zero if necessary, and n counts the
   number of wrap-arounds.

2つの州の変数がある州のマシンはこの過程の中心です: インデックスiとカウンタn。 インデックスiは拡張ストリングの位置について言及します。 それは0(第1ポジション)〜拡張ストリング(現在の終わりの潜在的位置について言及する)の現在長まで及びます。 現状が<n、i>、次の状態が<nであるということであるなら、i+1>はiであるならiが拡張ストリング、または<n+1、0>の長さ以下であるなら拡張ストリングの長さと等しいです。 言い換えれば、必要なら、ゼロに巻きつけて、それぞれの州の変化は増分へのiを引き起こします、そして、nは巻きつけて着るドレスの数を数えます。

   Notice that the state always advances monotonically (there is no way
   for the decoder to return to an earlier state).  At each state, an
   insertion is either performed or not performed.  At most one
   insertion is performed in a given state.  An insertion inserts the
   value of n at position i in the extended string.  The deltas are a
   run-length encoding of this sequence of events: they are the lengths
   of the runs of non-insertion states preceeding the insertion states.
   Hence, for each delta, the decoder performs delta state changes, then
   an insertion, and then one more state change.  (An implementation
   need not perform each state change individually, but can instead use
   division and remainder calculations to compute the next insertion
   state directly.)  It is an error if the inserted code point is a
   basic code point (because basic code points were supposed to be
   segregated as described in section 3.1).

状態が単調にいつも進むのに注意してください(デコーダが以前の状態に戻る方法が全くありません)。 各状態では、挿入は、実行されるか、または実行されません。 最も1つでは、挿入は与えられた状態で実行されます。 挿入は位置のiでnの値を拡張ストリングに挿入します。 デルタは出来事のこの系列をコード化するランレングスです: それらは挿入州をpreceedingする非挿入州の下痢の長さです。 したがって、各デルタに関して、デコーダがデルタ州の変化を実行して、その時が挿入であり、次に、1つは、より多くの州の変化です。 (実現は、個別にそれぞれの州の変化を実行する必要はありませんが、直接次の挿入状態を計算するのに代わりに分割と残り計算を使用できます。) 挿入されたコード・ポイントが基本コードポイント(セクション3.1で説明されるように基本コードポイントが隔離されるべきであったので)であるなら、それは誤りです。

   The encoder's main task is to derive the sequence of deltas that will
   cause the decoder to construct the desired string.  It can do this by
   repeatedly scanning the extended string for the next code point that
   the decoder would need to insert, and counting the number of state
   changes the decoder would need to perform, mindful of the fact that
   the decoder's extended string will include only those code points
   that have already been inserted.  Section 6.3 "Encoding procedure"
   gives a precise algorithm.

エンコーダの主なタスクはデコーダが必要なストリングを構成するデルタの系列を引き出すことです。 それは繰り返してデコーダが挿入する必要があるだろう次のコード・ポイントに拡張ストリングをスキャンして、デコーダが働くために必要とする州の変化の数を数えることによって、これができます、デコーダの拡張ストリングが既に挿入されたそれらのコード・ポイントだけを含むという事実では、心に留めます。 「手順をコード化する」というセクション6.3は正確なアルゴリズムを与えます。

3.3 Generalized variable-length integers

3.3 一般化された可変長の整数

   In a conventional integer representation the base is the number of
   distinct symbols for digits, whose values are 0 through base-1.  Let
   digit_0 denote the least significant digit, digit_1 the next least
   significant, and so on.  The value represented is the sum over j of
   digit_j * w(j), where w(j) = base^j is the weight (scale factor) for
   position j.  For example, in the base 8 integer 437, the digits are
   7, 3, and 4, and the weights are 1, 8, and 64, so the value is 7 +
   3*8 + 4*64 = 287.  This representation has two disadvantages:  First,
   there are multiple encodings of each value (because there can be
   extra zeros in the most significant positions), which is inconvenient

従来の整数表現では、ベースはケタの異なったシンボルの数です。(ケタの値はベース-1を通した0です)。 _0が次のケタ_1最少重要な最少重要なケタとそうを指示するケタをさせてください。 表された値はケタ_j*w(j)のjの上の合計です。そこでは、w(j)=ベース^jは位置のjのための重さ(位取り因数)です。 重りが例えば、ケタがベース8整数437において、7と、3と、4であり、1と、8と、64であるので、値は*64 = 287に7+3*8+4です。 この表現には、2回の損失があります: まず最初に、それぞれの価値の複数のencodingsがあります(余分なゼロが最も重要な位置にあることができるので)、不便などれ

Costello                    Standards Track                     [Page 5]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[5ページ]。

   when unique encodings are needed.  Second, the integer is not self-
   delimiting, so if multiple integers are concatenated the boundaries
   between them are lost.

ユニークなencodingsが必要であるときに。 2番目に、整数が自己の区切りでないので、複数の整数が連結されるなら、それらの間の境界は無くなっています。

   The generalized variable-length representation solves these two
   problems.  The digit values are still 0 through base-1, but now the
   integer is self-delimiting by means of thresholds t(j), each of which
   is in the range 0 through base-1.  Exactly one digit, the most
   significant, satisfies digit_j < t(j).  Therefore, if several
   integers are concatenated, it is easy to separate them, starting with
   the first if they are little-endian (least significant digit first),
   or starting with the last if they are big-endian (most significant
   digit first).  As before, the value is the sum over j of digit_j *
   w(j), but the weights are different:

一般化された可変長の表現はこれらの2つの問題を解決します。それでも、ケタ値はベース-1を通した0ですが、現在、整数は敷居によって自己にt(j)を区切ることです。ベース-1を通してそれぞれそれは範囲0にあります。 ちょうど最も重要な1ケタはケタ_j<t(j)を満たします。 したがって、いくつかの整数が連結されるなら、それらを切り離すのは簡単です、それらがリトルエンディアンであるなら1番目から始めて(最下位桁、1番目)、それらがビッグエンディアンであるなら最終から始まる、(最上位けた、1番目) 従来と同様、値はケタ_j*w(j)のjの上の合計ですが、重りは異なっています:

      w(0) = 1
      w(j) = w(j-1) * (base - t(j-1)) for j > 0

w(0)はj>0のためのw(j-1)1w(j)=*(ベース--t(j-1))と等しいです。

   For example, consider the little-endian sequence of base 8 digits
   734251...  Suppose the thresholds are 2, 3, 5, 5, 5, 5...  This
   implies that the weights are 1, 1*(8-2) = 6, 6*(8-3) = 30, 30*(8-5) =
   90, 90*(8-5) = 270, and so on.  7 is not less than 2, and 3 is not
   less than 3, but 4 is less than 5, so 4 is the last digit.  The value
   of 734 is 7*1 + 3*6 + 4*30 = 145.  The next integer is 251, with
   value 2*1 + 5*6 + 1*30 = 62.  Decoding this representation is very
   similar to decoding a conventional integer:  Start with a current
   value of N = 0 and a weight w = 1.  Fetch the next digit d and
   increase N by d * w.  If d is less than the current threshold (t)
   then stop, otherwise increase w by a factor of (base - t), update t
   for the next position, and repeat.

For example, consider the little-endian sequence of base 8 digits 734251... Suppose the thresholds are 2, 3, 5, 5, 5, 5... This implies that the weights are 1, 1*(8-2) = 6, 6*(8-3) = 30, 30*(8-5) = 90, 90*(8-5) = 270, and so on. 7 is not less than 2, and 3 is not less than 3, but 4 is less than 5, so 4 is the last digit. The value of 734 is 7*1 + 3*6 + 4*30 = 145. The next integer is 251, with value 2*1 + 5*6 + 1*30 = 62. Decoding this representation is very similar to decoding a conventional integer: Start with a current value of N = 0 and a weight w = 1. Fetch the next digit d and increase N by d * w. If d is less than the current threshold (t) then stop, otherwise increase w by a factor of (base - t), update t for the next position, and repeat.

   Encoding this representation is similar to encoding a conventional
   integer:  If N < t then output one digit for N and stop, otherwise
   output the digit for t + ((N - t) mod (base - t)), then replace N
   with (N - t) div (base - t), update t for the next position, and
   repeat.

Encoding this representation is similar to encoding a conventional integer: If N < t then output one digit for N and stop, otherwise output the digit for t + ((N - t) mod (base - t)), then replace N with (N - t) div (base - t), update t for the next position, and repeat.

   For any particular set of values of t(j), there is exactly one
   generalized variable-length representation of each nonnegative
   integral value.

For any particular set of values of t(j), there is exactly one generalized variable-length representation of each nonnegative integral value.

   Bootstring uses little-endian ordering so that the deltas can be
   separated starting with the first.  The t(j) values are defined in
   terms of the constants base, tmin, and tmax, and a state variable
   called bias:

Bootstring uses little-endian ordering so that the deltas can be separated starting with the first. The t(j) values are defined in terms of the constants base, tmin, and tmax, and a state variable called bias:

      t(j) = base * (j + 1) - bias,
      clamped to the range tmin through tmax

t(j) = base * (j + 1) - bias, clamped to the range tmin through tmax

Costello                    Standards Track                     [Page 6]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 6] RFC 3492 IDNA Punycode March 2003

   The clamping means that if the formula yields a value less than tmin
   or greater than tmax, then t(j) = tmin or tmax, respectively.  (In
   the pseudocode in section 6 "Bootstring algorithms", the expression
   base * (j + 1) is denoted by k for performance reasons.)  These t(j)
   values cause the representation to favor integers within a particular
   range determined by the bias.

The clamping means that if the formula yields a value less than tmin or greater than tmax, then t(j) = tmin or tmax, respectively. (In the pseudocode in section 6 "Bootstring algorithms", the expression base * (j + 1) is denoted by k for performance reasons.) These t(j) values cause the representation to favor integers within a particular range determined by the bias.

3.4 Bias adaptation

3.4 Bias adaptation

   After each delta is encoded or decoded, bias is set for the next
   delta as follows:

After each delta is encoded or decoded, bias is set for the next delta as follows:

   1. Delta is scaled in order to avoid overflow in the next step:

1. Delta is scaled in order to avoid overflow in the next step:

         let delta = delta div 2

let delta = delta div 2

      But when this is the very first delta, the divisor is not 2, but
      instead a constant called damp.  This compensates for the fact
      that the second delta is usually much smaller than the first.

But when this is the very first delta, the divisor is not 2, but instead a constant called damp. This compensates for the fact that the second delta is usually much smaller than the first.

   2. Delta is increased to compensate for the fact that the next delta
      will be inserting into a longer string:

2. Delta is increased to compensate for the fact that the next delta will be inserting into a longer string:

         let delta = delta + (delta div numpoints)

let delta = delta + (delta div numpoints)

      numpoints is the total number of code points encoded/decoded so
      far (including the one corresponding to this delta itself, and
      including the basic code points).

numpoints is the total number of code points encoded/decoded so far (including the one corresponding to this delta itself, and including the basic code points).

   3. Delta is repeatedly divided until it falls within a threshold, to
      predict the minimum number of digits needed to represent the next
      delta:

3. Delta is repeatedly divided until it falls within a threshold, to predict the minimum number of digits needed to represent the next delta:

         while delta > ((base - tmin) * tmax) div 2
         do let delta = delta div (base - tmin)

while delta > ((base - tmin) * tmax) div 2 do let delta = delta div (base - tmin)

   4. The bias is set:

4. The bias is set:

         let bias =
           (base * the number of divisions performed in step 3) +
           (((base - tmin + 1) * delta) div (delta + skew))

let bias = (base * the number of divisions performed in step 3) + (((base - tmin + 1) * delta) div (delta + skew))

      The motivation for this procedure is that the current delta
      provides a hint about the likely size of the next delta, and so
      t(j) is set to tmax for the more significant digits starting with
      the one expected to be last, tmin for the less significant digits
      up through the one expected to be third-last, and somewhere
      between tmin and tmax for the digit expected to be second-last

The motivation for this procedure is that the current delta provides a hint about the likely size of the next delta, and so t(j) is set to tmax for the more significant digits starting with the one expected to be last, tmin for the less significant digits up through the one expected to be third-last, and somewhere between tmin and tmax for the digit expected to be second-last

Costello                    Standards Track                     [Page 7]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 7] RFC 3492 IDNA Punycode March 2003

      (balancing the hope of the expected-last digit being unnecessary
      against the danger of it being insufficient).

(balancing the hope of the expected-last digit being unnecessary against the danger of it being insufficient).

4. Bootstring parameters

4. Bootstring parameters

   Given a set of basic code points, one needs to be designated as the
   delimiter.  The base cannot be greater than the number of
   distinguishable basic code points remaining.  The digit-values in the
   range 0 through base-1 need to be associated with distinct non-
   delimiter basic code points.  In some cases multiple code points need
   to have the same digit-value; for example, uppercase and lowercase
   versions of the same letter need to be equivalent if basic strings
   are case-insensitive.

Given a set of basic code points, one needs to be designated as the delimiter. The base cannot be greater than the number of distinguishable basic code points remaining. The digit-values in the range 0 through base-1 need to be associated with distinct non- delimiter basic code points. In some cases multiple code points need to have the same digit-value; for example, uppercase and lowercase versions of the same letter need to be equivalent if basic strings are case-insensitive.

   The initial value of n cannot be greater than the minimum non-basic
   code point that could appear in extended strings.

The initial value of n cannot be greater than the minimum non-basic code point that could appear in extended strings.

   The remaining five parameters (tmin, tmax, skew, damp, and the
   initial value of bias) need to satisfy the following constraints:

The remaining five parameters (tmin, tmax, skew, damp, and the initial value of bias) need to satisfy the following constraints:

      0 <= tmin <= tmax <= base-1
      skew >= 1
      damp >= 2
      initial_bias mod base <= base - tmin

0 <= tmin <= tmax <= base-1 skew >= 1 damp >= 2 initial_bias mod base <= base - tmin

   Provided the constraints are satisfied, these five parameters affect
   efficiency but not correctness.  They are best chosen empirically.

Provided the constraints are satisfied, these five parameters affect efficiency but not correctness. They are best chosen empirically.

   If support for mixed-case annotation is desired (see appendix A),
   make sure that the code points corresponding to 0 through tmax-1 all
   have both uppercase and lowercase forms.

If support for mixed-case annotation is desired (see appendix A), make sure that the code points corresponding to 0 through tmax-1 all have both uppercase and lowercase forms.

5. Parameter values for Punycode

5. Parameter values for Punycode

   Punycode uses the following Bootstring parameter values:

Punycode uses the following Bootstring parameter values:

      base         = 36
      tmin         = 1
      tmax         = 26
      skew         = 38
      damp         = 700
      initial_bias = 72
      initial_n    = 128 = 0x80

base = 36 tmin = 1 tmax = 26 skew = 38 damp = 700 initial_bias = 72 initial_n = 128 = 0x80

   Although the only restriction Punycode imposes on the input integers
   is that they be nonnegative, these parameters are especially designed
   to work well with Unicode [UNICODE] code points, which are integers
   in the range 0..10FFFF (but not D800..DFFF, which are reserved for

Although the only restriction Punycode imposes on the input integers is that they be nonnegative, these parameters are especially designed to work well with Unicode [UNICODE] code points, which are integers in the range 0..10FFFF (but not D800..DFFF, which are reserved for

Costello                    Standards Track                     [Page 8]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 8] RFC 3492 IDNA Punycode March 2003

   use by the UTF-16 encoding of Unicode).  The basic code points are
   the ASCII [ASCII] code points (0..7F), of which U+002D (-) is the
   delimiter, and some of the others have digit-values as follows:

use by the UTF-16 encoding of Unicode). The basic code points are the ASCII [ASCII] code points (0..7F), of which U+002D (-) is the delimiter, and some of the others have digit-values as follows:

      code points    digit-values
      ------------   ----------------------
      41..5A (A-Z) =  0 to 25, respectively
      61..7A (a-z) =  0 to 25, respectively
      30..39 (0-9) = 26 to 35, respectively

code points digit-values ------------ ---------------------- 41..5A (A-Z) = 0 to 25, respectively 61..7A (a-z) = 0 to 25, respectively 30..39 (0-9) = 26 to 35, respectively

   Using hyphen-minus as the delimiter implies that the encoded string
   can end with a hyphen-minus only if the Unicode string consists
   entirely of basic code points, but IDNA forbids such strings from
   being encoded.  The encoded string can begin with a hyphen-minus, but
   IDNA prepends a prefix.  Therefore IDNA using Punycode conforms to
   the RFC 952 rule that host name labels neither begin nor end with a
   hyphen-minus [RFC952].

Using hyphen-minus as the delimiter implies that the encoded string can end with a hyphen-minus only if the Unicode string consists entirely of basic code points, but IDNA forbids such strings from being encoded. The encoded string can begin with a hyphen-minus, but IDNA prepends a prefix. Therefore IDNA using Punycode conforms to the RFC 952 rule that host name labels neither begin nor end with a hyphen-minus [RFC952].

   A decoder MUST recognize the letters in both uppercase and lowercase
   forms (including mixtures of both forms).  An encoder SHOULD output
   only uppercase forms or only lowercase forms, unless it uses mixed-
   case annotation (see appendix A).

A decoder MUST recognize the letters in both uppercase and lowercase forms (including mixtures of both forms). An encoder SHOULD output only uppercase forms or only lowercase forms, unless it uses mixed- case annotation (see appendix A).

   Presumably most users will not manually write or type encoded strings
   (as opposed to cutting and pasting them), but those who do will need
   to be alert to the potential visual ambiguity between the following
   sets of characters:

Presumably most users will not manually write or type encoded strings (as opposed to cutting and pasting them), but those who do will need to be alert to the potential visual ambiguity between the following sets of characters:

      G 6
      I l 1
      O 0
      S 5
      U V
      Z 2

G 6 I l 1 O 0 S 5 U V Z 2

   Such ambiguities are usually resolved by context, but in a Punycode
   encoded string there is no context apparent to humans.

Such ambiguities are usually resolved by context, but in a Punycode encoded string there is no context apparent to humans.

6. Bootstring algorithms

6. Bootstring algorithms

   Some parts of the pseudocode can be omitted if the parameters satisfy
   certain conditions (for which Punycode qualifies).  These parts are
   enclosed in {braces}, and notes immediately following the pseudocode
   explain the conditions under which they can be omitted.

Some parts of the pseudocode can be omitted if the parameters satisfy certain conditions (for which Punycode qualifies). These parts are enclosed in {braces}, and notes immediately following the pseudocode explain the conditions under which they can be omitted.

Costello                    Standards Track                     [Page 9]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 9] RFC 3492 IDNA Punycode March 2003

   Formally, code points are integers, and hence the pseudocode assumes
   that arithmetic operations can be performed directly on code points.
   In some programming languages, explicit conversion between code
   points and integers might be necessary.

Formally, code points are integers, and hence the pseudocode assumes that arithmetic operations can be performed directly on code points. In some programming languages, explicit conversion between code points and integers might be necessary.

6.1 Bias adaptation function

6.1 Bias adaptation function

   function adapt(delta,numpoints,firsttime):
     if firsttime then let delta = delta div damp
     else let delta = delta div 2
     let delta = delta + (delta div numpoints)
     let k = 0
     while delta > ((base - tmin) * tmax) div 2 do begin
       let delta = delta div (base - tmin)
       let k = k + base
     end
     return k + (((base - tmin + 1) * delta) div (delta + skew))

function adapt(delta,numpoints,firsttime): if firsttime then let delta = delta div damp else let delta = delta div 2 let delta = delta + (delta div numpoints) let k = 0 while delta > ((base - tmin) * tmax) div 2 do begin let delta = delta div (base - tmin) let k = k + base end return k + (((base - tmin + 1) * delta) div (delta + skew))

   It does not matter whether the modifications to delta and k inside
   adapt() affect variables of the same name inside the
   encoding/decoding procedures, because after calling adapt() the
   caller does not read those variables before overwriting them.

It does not matter whether the modifications to delta and k inside adapt() affect variables of the same name inside the encoding/decoding procedures, because after calling adapt() the caller does not read those variables before overwriting them.

Costello                    Standards Track                    [Page 10]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 10] RFC 3492 IDNA Punycode March 2003

6.2 Decoding procedure

6.2 Decoding procedure

   let n = initial_n
   let i = 0
   let bias = initial_bias
   let output = an empty string indexed from 0
   consume all code points before the last delimiter (if there is one)
     and copy them to output, fail on any non-basic code point
   if more than zero code points were consumed then consume one more
     (which will be the last delimiter)
   while the input is not exhausted do begin
     let oldi = i
     let w = 1
     for k = base to infinity in steps of base do begin
       consume a code point, or fail if there was none to consume
       let digit = the code point's digit-value, fail if it has none
       let i = i + digit * w, fail on overflow
       let t = tmin if k <= bias {+ tmin}, or
               tmax if k >= bias + tmax, or k - bias otherwise
       if digit < t then break
       let w = w * (base - t), fail on overflow
     end
     let bias = adapt(i - oldi, length(output) + 1, test oldi is 0?)
     let n = n + i div (length(output) + 1), fail on overflow
     let i = i mod (length(output) + 1)
     {if n is a basic code point then fail}
     insert n into output at position i
     increment i
   end

let n = initial_n let i = 0 let bias = initial_bias let output = an empty string indexed from 0 consume all code points before the last delimiter (if there is one) and copy them to output, fail on any non-basic code point if more than zero code points were consumed then consume one more (which will be the last delimiter) while the input is not exhausted do begin let oldi = i let w = 1 for k = base to infinity in steps of base do begin consume a code point, or fail if there was none to consume let digit = the code point's digit-value, fail if it has none let i = i + digit * w, fail on overflow let t = tmin if k <= bias {+ tmin}, or tmax if k >= bias + tmax, or k - bias otherwise if digit < t then break let w = w * (base - t), fail on overflow end let bias = adapt(i - oldi, length(output) + 1, test oldi is 0?) let n = n + i div (length(output) + 1), fail on overflow let i = i mod (length(output) + 1) {if n is a basic code point then fail} insert n into output at position i increment i end

   The full statement enclosed in braces (checking whether n is a basic
   code point) can be omitted if initial_n exceeds all basic code points
   (which is true for Punycode), because n is never less than initial_n.

The full statement enclosed in braces (checking whether n is a basic code point) can be omitted if initial_n exceeds all basic code points (which is true for Punycode), because n is never less than initial_n.

   In the assignment of t, where t is clamped to the range tmin through
   tmax, "+ tmin" can always be omitted.  This makes the clamping
   calculation incorrect when bias < k < bias + tmin, but that cannot
   happen because of the way bias is computed and because of the
   constraints on the parameters.

In the assignment of t, where t is clamped to the range tmin through tmax, "+ tmin" can always be omitted. This makes the clamping calculation incorrect when bias < k < bias + tmin, but that cannot happen because of the way bias is computed and because of the constraints on the parameters.

   Because the decoder state can only advance monotonically, and there
   is only one representation of any delta, there is therefore only one
   encoded string that can represent a given sequence of integers.  The
   only error conditions are invalid code points, unexpected end-of-
   input, overflow, and basic code points encoded using deltas instead
   of appearing literally.  If the decoder fails on these errors as
   shown above, then it cannot produce the same output for two distinct
   inputs.  Without this property it would have been necessary to re-

Because the decoder state can only advance monotonically, and there is only one representation of any delta, there is therefore only one encoded string that can represent a given sequence of integers. The only error conditions are invalid code points, unexpected end-of- input, overflow, and basic code points encoded using deltas instead of appearing literally. If the decoder fails on these errors as shown above, then it cannot produce the same output for two distinct inputs. Without this property it would have been necessary to re-

Costello                    Standards Track                    [Page 11]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 11] RFC 3492 IDNA Punycode March 2003

   encode the output and verify that it matches the input in order to
   guarantee the uniqueness of the encoding.

encode the output and verify that it matches the input in order to guarantee the uniqueness of the encoding.

6.3 Encoding procedure

6.3 Encoding procedure

   let n = initial_n
   let delta = 0
   let bias = initial_bias
   let h = b = the number of basic code points in the input
   copy them to the output in order, followed by a delimiter if b > 0
   {if the input contains a non-basic code point < n then fail}
   while h < length(input) do begin
     let m = the minimum {non-basic} code point >= n in the input
     let delta = delta + (m - n) * (h + 1), fail on overflow
     let n = m
     for each code point c in the input (in order) do begin
       if c < n {or c is basic} then increment delta, fail on overflow
       if c == n then begin
         let q = delta
         for k = base to infinity in steps of base do begin
           let t = tmin if k <= bias {+ tmin}, or
                   tmax if k >= bias + tmax, or k - bias otherwise
           if q < t then break
           output the code point for digit t + ((q - t) mod (base - t))
           let q = (q - t) div (base - t)
         end
         output the code point for digit q
         let bias = adapt(delta, h + 1, test h equals b?)
         let delta = 0
         increment h
       end
     end
     increment delta and n
   end

let n = initial_n let delta = 0 let bias = initial_bias let h = b = the number of basic code points in the input copy them to the output in order, followed by a delimiter if b > 0 {if the input contains a non-basic code point < n then fail} while h < length(input) do begin let m = the minimum {non-basic} code point >= n in the input let delta = delta + (m - n) * (h + 1), fail on overflow let n = m for each code point c in the input (in order) do begin if c < n {or c is basic} then increment delta, fail on overflow if c == n then begin let q = delta for k = base to infinity in steps of base do begin let t = tmin if k <= bias {+ tmin}, or tmax if k >= bias + tmax, or k - bias otherwise if q < t then break output the code point for digit t + ((q - t) mod (base - t)) let q = (q - t) div (base - t) end output the code point for digit q let bias = adapt(delta, h + 1, test h equals b?) let delta = 0 increment h end end increment delta and n end

   The full statement enclosed in braces (checking whether the input
   contains a non-basic code point less than n) can be omitted if all
   code points less than initial_n are basic code points (which is true
   for Punycode if code points are unsigned).

The full statement enclosed in braces (checking whether the input contains a non-basic code point less than n) can be omitted if all code points less than initial_n are basic code points (which is true for Punycode if code points are unsigned).

   The brace-enclosed conditions "non-basic" and "or c is basic" can be
   omitted if initial_n exceeds all basic code points (which is true for
   Punycode), because the code point being tested is never less than
   initial_n.

The brace-enclosed conditions "non-basic" and "or c is basic" can be omitted if initial_n exceeds all basic code points (which is true for Punycode), because the code point being tested is never less than initial_n.

   In the assignment of t, where t is clamped to the range tmin through
   tmax, "+ tmin" can always be omitted.  This makes the clamping
   calculation incorrect when bias < k < bias + tmin, but that cannot

In the assignment of t, where t is clamped to the range tmin through tmax, "+ tmin" can always be omitted. This makes the clamping calculation incorrect when bias < k < bias + tmin, but that cannot

Costello                    Standards Track                    [Page 12]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 12] RFC 3492 IDNA Punycode March 2003

   happen because of the way bias is computed and because of the
   constraints on the parameters.

happen because of the way bias is computed and because of the constraints on the parameters.

   The checks for overflow are necessary to avoid producing invalid
   output when the input contains very large values or is very long.

The checks for overflow are necessary to avoid producing invalid output when the input contains very large values or is very long.

   The increment of delta at the bottom of the outer loop cannot
   overflow because delta < length(input) before the increment, and
   length(input) is already assumed to be representable.  The increment
   of n could overflow, but only if h == length(input), in which case
   the procedure is finished anyway.

The increment of delta at the bottom of the outer loop cannot overflow because delta < length(input) before the increment, and length(input) is already assumed to be representable. The increment of n could overflow, but only if h == length(input), in which case the procedure is finished anyway.

6.4 Overflow handling

6.4 Overflow handling

   For IDNA, 26-bit unsigned integers are sufficient to handle all valid
   IDNA labels without overflow, because any string that needed a 27-bit
   delta would have to exceed either the code point limit (0..10FFFF) or
   the label length limit (63 characters).  However, overflow handling
   is necessary because the inputs are not necessarily valid IDNA
   labels.

For IDNA, 26-bit unsigned integers are sufficient to handle all valid IDNA labels without overflow, because any string that needed a 27-bit delta would have to exceed either the code point limit (0..10FFFF) or the label length limit (63 characters). However, overflow handling is necessary because the inputs are not necessarily valid IDNA labels.

   If the programming language does not provide overflow detection, the
   following technique can be used.  Suppose A, B, and C are
   representable nonnegative integers and C is nonzero.  Then A + B
   overflows if and only if B > maxint - A, and A + (B * C) overflows if
   and only if B > (maxint - A) div C, where maxint is the greatest
   integer for which maxint + 1 cannot be represented.  Refer to
   appendix C "Punycode sample implementation" for demonstrations of
   this technique in the C language.

If the programming language does not provide overflow detection, the following technique can be used. Suppose A, B, and C are representable nonnegative integers and C is nonzero. Then A + B overflows if and only if B > maxint - A, and A + (B * C) overflows if and only if B > (maxint - A) div C, where maxint is the greatest integer for which maxint + 1 cannot be represented. Refer to appendix C "Punycode sample implementation" for demonstrations of this technique in the C language.

   The decoding and encoding algorithms shown in sections 6.2 and 6.3
   handle overflow by detecting it whenever it happens.  Another
   approach is to enforce limits on the inputs that prevent overflow
   from happening.  For example, if the encoder were to verify that no
   input code points exceed M and that the input length does not exceed
   L, then no delta could ever exceed (M - initial_n) * (L + 1), and
   hence no overflow could occur if integer variables were capable of
   representing values that large.  This prevention approach would
   impose more restrictions on the input than the detection approach
   does, but might be considered simpler in some programming languages.

The decoding and encoding algorithms shown in sections 6.2 and 6.3 handle overflow by detecting it whenever it happens. Another approach is to enforce limits on the inputs that prevent overflow from happening. For example, if the encoder were to verify that no input code points exceed M and that the input length does not exceed L, then no delta could ever exceed (M - initial_n) * (L + 1), and hence no overflow could occur if integer variables were capable of representing values that large. This prevention approach would impose more restrictions on the input than the detection approach does, but might be considered simpler in some programming languages.

   In theory, the decoder could use an analogous approach, limiting the
   number of digits in a variable-length integer (that is, limiting the
   number of iterations in the innermost loop).  However, the number of
   digits that suffice to represent a given delta can sometimes
   represent much larger deltas (because of the adaptation), and hence
   this approach would probably need integers wider than 32 bits.

In theory, the decoder could use an analogous approach, limiting the number of digits in a variable-length integer (that is, limiting the number of iterations in the innermost loop). However, the number of digits that suffice to represent a given delta can sometimes represent much larger deltas (because of the adaptation), and hence this approach would probably need integers wider than 32 bits.

Costello                    Standards Track                    [Page 13]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 13] RFC 3492 IDNA Punycode March 2003

   Yet another approach for the decoder is to allow overflow to occur,
   but to check the final output string by re-encoding it and comparing
   to the decoder input.  If and only if they do not match (using a
   case-insensitive ASCII comparison) overflow has occurred.  This
   delayed-detection approach would not impose any more restrictions on
   the input than the immediate-detection approach does, and might be
   considered simpler in some programming languages.

Yet another approach for the decoder is to allow overflow to occur, but to check the final output string by re-encoding it and comparing to the decoder input. If and only if they do not match (using a case-insensitive ASCII comparison) overflow has occurred. This delayed-detection approach would not impose any more restrictions on the input than the immediate-detection approach does, and might be considered simpler in some programming languages.

   In fact, if the decoder is used only inside the IDNA ToUnicode
   operation [IDNA], then it need not check for overflow at all, because
   ToUnicode performs a higher level re-encoding and comparison, and a
   mismatch has the same consequence as if the Punycode decoder had
   failed.

In fact, if the decoder is used only inside the IDNA ToUnicode operation [IDNA], then it need not check for overflow at all, because ToUnicode performs a higher level re-encoding and comparison, and a mismatch has the same consequence as if the Punycode decoder had failed.

7. Punycode examples

7. Punycode examples

7.1 Sample strings

7.1 Sample strings

   In the Punycode encodings below, the ACE prefix is not shown.
   Backslashes show where line breaks have been inserted in strings too
   long for one line.

In the Punycode encodings below, the ACE prefix is not shown. Backslashes show where line breaks have been inserted in strings too long for one line.

   The first several examples are all translations of the sentence "Why
   can't they just speak in <language>?" (courtesy of Michael Kaplan's
   "provincial" page [PROVINCIAL]).  Word breaks and punctuation have
   been removed, as is often done in domain names.

The first several examples are all translations of the sentence "Why can't they just speak in <language>?" (courtesy of Michael Kaplan's "provincial" page [PROVINCIAL]). Word breaks and punctuation have been removed, as is often done in domain names.

   (A) Arabic (Egyptian):
       u+0644 u+064A u+0647 u+0645 u+0627 u+0628 u+062A u+0643 u+0644
       u+0645 u+0648 u+0634 u+0639 u+0631 u+0628 u+064A u+061F
       Punycode: egbpdaj6bu4bxfgehfvwxn

(A) Arabic (Egyptian): u+0644 u+064A u+0647 u+0645 u+0627 u+0628 u+062A u+0643 u+0644 u+0645 u+0648 u+0634 u+0639 u+0631 u+0628 u+064A u+061F Punycode: egbpdaj6bu4bxfgehfvwxn

   (B) Chinese (simplified):
       u+4ED6 u+4EEC u+4E3A u+4EC0 u+4E48 u+4E0D u+8BF4 u+4E2D u+6587
       Punycode: ihqwcrb4cv8a8dqg056pqjye

(B) Chinese (simplified): u+4ED6 u+4EEC u+4E3A u+4EC0 u+4E48 u+4E0D u+8BF4 u+4E2D u+6587 Punycode: ihqwcrb4cv8a8dqg056pqjye

   (C) Chinese (traditional):
       u+4ED6 u+5011 u+7232 u+4EC0 u+9EBD u+4E0D u+8AAA u+4E2D u+6587
       Punycode: ihqwctvzc91f659drss3x8bo0yb

(C) Chinese (traditional): u+4ED6 u+5011 u+7232 u+4EC0 u+9EBD u+4E0D u+8AAA u+4E2D u+6587 Punycode: ihqwctvzc91f659drss3x8bo0yb

   (D) Czech: Pro<ccaron>prost<ecaron>nemluv<iacute><ccaron>esky
       U+0050 u+0072 u+006F u+010D u+0070 u+0072 u+006F u+0073 u+0074
       u+011B u+006E u+0065 u+006D u+006C u+0075 u+0076 u+00ED u+010D
       u+0065 u+0073 u+006B u+0079
       Punycode: Proprostnemluvesky-uyb24dma41a

(D) Czech: Pro<ccaron>prost<ecaron>nemluv<iacute><ccaron>esky U+0050 u+0072 u+006F u+010D u+0070 u+0072 u+006F u+0073 u+0074 u+011B u+006E u+0065 u+006D u+006C u+0075 u+0076 u+00ED u+010D u+0065 u+0073 u+006B u+0079 Punycode: Proprostnemluvesky-uyb24dma41a

Costello                    Standards Track                    [Page 14]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 14] RFC 3492 IDNA Punycode March 2003

   (E) Hebrew:
       u+05DC u+05DE u+05D4 u+05D4 u+05DD u+05E4 u+05E9 u+05D5 u+05D8
       u+05DC u+05D0 u+05DE u+05D3 u+05D1 u+05E8 u+05D9 u+05DD u+05E2
       u+05D1 u+05E8 u+05D9 u+05EA
       Punycode: 4dbcagdahymbxekheh6e0a7fei0b

(E) Hebrew: u+05DC u+05DE u+05D4 u+05D4 u+05DD u+05E4 u+05E9 u+05D5 u+05D8 u+05DC u+05D0 u+05DE u+05D3 u+05D1 u+05E8 u+05D9 u+05DD u+05E2 u+05D1 u+05E8 u+05D9 u+05EA Punycode: 4dbcagdahymbxekheh6e0a7fei0b

   (F) Hindi (Devanagari):
       u+092F u+0939 u+0932 u+094B u+0917 u+0939 u+093F u+0928 u+094D
       u+0926 u+0940 u+0915 u+094D u+092F u+094B u+0902 u+0928 u+0939
       u+0940 u+0902 u+092C u+094B u+0932 u+0938 u+0915 u+0924 u+0947
       u+0939 u+0948 u+0902
       Punycode: i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd

(F) Hindi (Devanagari): u+092F u+0939 u+0932 u+094B u+0917 u+0939 u+093F u+0928 u+094D u+0926 u+0940 u+0915 u+094D u+092F u+094B u+0902 u+0928 u+0939 u+0940 u+0902 u+092C u+094B u+0932 u+0938 u+0915 u+0924 u+0947 u+0939 u+0948 u+0902 Punycode: i1baa7eci9glrd9b2ae1bj0hfcgg6iyaf8o0a1dig0cd

   (G) Japanese (kanji and hiragana):
       u+306A u+305C u+307F u+3093 u+306A u+65E5 u+672C u+8A9E u+3092
       u+8A71 u+3057 u+3066 u+304F u+308C u+306A u+3044 u+306E u+304B
       Punycode: n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa

(G) Japanese (kanji and hiragana): u+306A u+305C u+307F u+3093 u+306A u+65E5 u+672C u+8A9E u+3092 u+8A71 u+3057 u+3066 u+304F u+308C u+306A u+3044 u+306E u+304B Punycode: n8jok5ay5dzabd5bym9f0cm5685rrjetr6pdxa

   (H) Korean (Hangul syllables):
       u+C138 u+ACC4 u+C758 u+BAA8 u+B4E0 u+C0AC u+B78C u+B4E4 u+C774
       u+D55C u+AD6D u+C5B4 u+B97C u+C774 u+D574 u+D55C u+B2E4 u+BA74
       u+C5BC u+B9C8 u+B098 u+C88B u+C744 u+AE4C
       Punycode: 989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5j\
                 psd879ccm6fea98c

(H) Korean (Hangul syllables): u+C138 u+ACC4 u+C758 u+BAA8 u+B4E0 u+C0AC u+B78C u+B4E4 u+C774 u+D55C u+AD6D u+C5B4 u+B97C u+C774 u+D574 u+D55C u+B2E4 u+BA74 u+C5BC u+B9C8 u+B098 u+C88B u+C744 u+AE4C Punycode: 989aomsvi5e83db1d2a355cv1e0vak1dwrv93d5xbh15a0dt30a5j\ psd879ccm6fea98c

   (I) Russian (Cyrillic):
       U+043F u+043E u+0447 u+0435 u+043C u+0443 u+0436 u+0435 u+043E
       u+043D u+0438 u+043D u+0435 u+0433 u+043E u+0432 u+043E u+0440
       u+044F u+0442 u+043F u+043E u+0440 u+0443 u+0441 u+0441 u+043A
       u+0438
       Punycode: b1abfaaepdrnnbgefbaDotcwatmq2g4l

(I) Russian (Cyrillic): U+043F u+043E u+0447 u+0435 u+043C u+0443 u+0436 u+0435 u+043E u+043D u+0438 u+043D u+0435 u+0433 u+043E u+0432 u+043E u+0440 u+044F u+0442 u+043F u+043E u+0440 u+0443 u+0441 u+0441 u+043A u+0438 Punycode: b1abfaaepdrnnbgefbaDotcwatmq2g4l

   (J) Spanish: Porqu<eacute>nopuedensimplementehablarenEspa<ntilde>ol
       U+0050 u+006F u+0072 u+0071 u+0075 u+00E9 u+006E u+006F u+0070
       u+0075 u+0065 u+0064 u+0065 u+006E u+0073 u+0069 u+006D u+0070
       u+006C u+0065 u+006D u+0065 u+006E u+0074 u+0065 u+0068 u+0061
       u+0062 u+006C u+0061 u+0072 u+0065 u+006E U+0045 u+0073 u+0070
       u+0061 u+00F1 u+006F u+006C
       Punycode: PorqunopuedensimplementehablarenEspaol-fmd56a

(J) Spanish: Porqu<eacute>nopuedensimplementehablarenEspa<ntilde>ol U+0050 u+006F u+0072 u+0071 u+0075 u+00E9 u+006E u+006F u+0070 u+0075 u+0065 u+0064 u+0065 u+006E u+0073 u+0069 u+006D u+0070 u+006C u+0065 u+006D u+0065 u+006E u+0074 u+0065 u+0068 u+0061 u+0062 u+006C u+0061 u+0072 u+0065 u+006E U+0045 u+0073 u+0070 u+0061 u+00F1 u+006F u+006C Punycode: PorqunopuedensimplementehablarenEspaol-fmd56a

   (K) Vietnamese:
       T<adotbelow>isaoh<odotbelow>kh<ocirc>ngth<ecirchookabove>ch\
       <ihookabove>n<oacute>iti<ecircacute>ngVi<ecircdotbelow>t
       U+0054 u+1EA1 u+0069 u+0073 u+0061 u+006F u+0068 u+1ECD u+006B
       u+0068 u+00F4 u+006E u+0067 u+0074 u+0068 u+1EC3 u+0063 u+0068
       u+1EC9 u+006E u+00F3 u+0069 u+0074 u+0069 u+1EBF u+006E u+0067
       U+0056 u+0069 u+1EC7 u+0074
       Punycode: TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g

(K) Vietnamese: T<adotbelow>isaoh<odotbelow>kh<ocirc>ngth<ecirchookabove>ch\ <ihookabove>n<oacute>iti<ecircacute>ngVi<ecircdotbelow>t U+0054 u+1EA1 u+0069 u+0073 u+0061 u+006F u+0068 u+1ECD u+006B u+0068 u+00F4 u+006E u+0067 u+0074 u+0068 u+1EC3 u+0063 u+0068 u+1EC9 u+006E u+00F3 u+0069 u+0074 u+0069 u+1EBF u+006E u+0067 U+0056 u+0069 u+1EC7 u+0074 Punycode: TisaohkhngthchnitingVit-kjcr8268qyxafd2f1b9g

Costello                    Standards Track                    [Page 15]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 15] RFC 3492 IDNA Punycode March 2003

   The next several examples are all names of Japanese music artists,
   song titles, and TV programs, just because the author happens to have
   them handy (but Japanese is useful for providing examples of single-
   row text, two-row text, ideographic text, and various mixtures
   thereof).

The next several examples are all names of Japanese music artists, song titles, and TV programs, just because the author happens to have them handy (but Japanese is useful for providing examples of single- row text, two-row text, ideographic text, and various mixtures thereof).

   (L) 3<nen>B<gumi><kinpachi><sensei>
       u+0033 u+5E74 U+0042 u+7D44 u+91D1 u+516B u+5148 u+751F
       Punycode: 3B-ww4c5e180e575a65lsy2b

(L) 3<nen>B<gumi><kinpachi><sensei> u+0033 u+5E74 U+0042 u+7D44 u+91D1 u+516B u+5148 u+751F Punycode: 3B-ww4c5e180e575a65lsy2b

   (M) <amuro><namie>-with-SUPER-MONKEYS
       u+5B89 u+5BA4 u+5948 u+7F8E u+6075 u+002D u+0077 u+0069 u+0074
       u+0068 u+002D U+0053 U+0055 U+0050 U+0045 U+0052 u+002D U+004D
       U+004F U+004E U+004B U+0045 U+0059 U+0053
       Punycode: -with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n

(M) <amuro><namie>-with-SUPER-MONKEYS u+5B89 u+5BA4 u+5948 u+7F8E u+6075 u+002D u+0077 u+0069 u+0074 u+0068 u+002D U+0053 U+0055 U+0050 U+0045 U+0052 u+002D U+004D U+004F U+004E U+004B U+0045 U+0059 U+0053 Punycode: -with-SUPER-MONKEYS-pc58ag80a8qai00g7n9n

   (N) Hello-Another-Way-<sorezore><no><basho>
       U+0048 u+0065 u+006C u+006C u+006F u+002D U+0041 u+006E u+006F
       u+0074 u+0068 u+0065 u+0072 u+002D U+0057 u+0061 u+0079 u+002D
       u+305D u+308C u+305E u+308C u+306E u+5834 u+6240
       Punycode: Hello-Another-Way--fc4qua05auwb3674vfr0b

(N) Hello-Another-Way-<sorezore><no><basho> U+0048 u+0065 u+006C u+006C u+006F u+002D U+0041 u+006E u+006F u+0074 u+0068 u+0065 u+0072 u+002D U+0057 u+0061 u+0079 u+002D u+305D u+308C u+305E u+308C u+306E u+5834 u+6240 Punycode: Hello-Another-Way--fc4qua05auwb3674vfr0b

   (O) <hitotsu><yane><no><shita>2
       u+3072 u+3068 u+3064 u+5C4B u+6839 u+306E u+4E0B u+0032
       Punycode: 2-u9tlzr9756bt3uc0v

(O) <hitotsu><yane><no><shita>2 u+3072 u+3068 u+3064 u+5C4B u+6839 u+306E u+4E0B u+0032 Punycode: 2-u9tlzr9756bt3uc0v

   (P) Maji<de>Koi<suru>5<byou><mae>
       U+004D u+0061 u+006A u+0069 u+3067 U+004B u+006F u+0069 u+3059
       u+308B u+0035 u+79D2 u+524D
       Punycode: MajiKoi5-783gue6qz075azm5e

(P) Maji<de>Koi<suru>5<byou><mae> U+004D u+0061 u+006A u+0069 u+3067 U+004B u+006F u+0069 u+3059 u+308B u+0035 u+79D2 u+524D Punycode: MajiKoi5-783gue6qz075azm5e

   (Q) <pafii>de<runba>
       u+30D1 u+30D5 u+30A3 u+30FC u+0064 u+0065 u+30EB u+30F3 u+30D0
       Punycode: de-jg4avhby1noc0d

(Q) <pafii>de<runba> u+30D1 u+30D5 u+30A3 u+30FC u+0064 u+0065 u+30EB u+30F3 u+30D0 Punycode: de-jg4avhby1noc0d

   (R) <sono><supiido><de>
       u+305D u+306E u+30B9 u+30D4 u+30FC u+30C9 u+3067
       Punycode: d9juau41awczczp

(R) <sono><supiido><de> u+305D u+306E u+30B9 u+30D4 u+30FC u+30C9 u+3067 Punycode: d9juau41awczczp

   The last example is an ASCII string that breaks the existing rules
   for host name labels.  (It is not a realistic example for IDNA,
   because IDNA never encodes pure ASCII labels.)

The last example is an ASCII string that breaks the existing rules for host name labels. (It is not a realistic example for IDNA, because IDNA never encodes pure ASCII labels.)

   (S) -> $1.00 <-
       u+002D u+003E u+0020 u+0024 u+0031 u+002E u+0030 u+0030 u+0020
       u+003C u+002D
       Punycode: -> $1.00 <--

(S) -> $1.00 <- u+002D u+003E u+0020 u+0024 u+0031 u+002E u+0030 u+0030 u+0020 u+003C u+002D Punycode: -> $1.00 <--

Costello                    Standards Track                    [Page 16]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 16] RFC 3492 IDNA Punycode March 2003

7.2 Decoding traces

7.2 Decoding traces

   In the following traces, the evolving state of the decoder is shown
   as a sequence of hexadecimal values, representing the code points in
   the extended string.  An asterisk appears just after the most
   recently inserted code point, indicating both n (the value preceeding
   the asterisk) and i (the position of the value just after the
   asterisk).  Other numerical values are decimal.

In the following traces, the evolving state of the decoder is shown as a sequence of hexadecimal values, representing the code points in the extended string. An asterisk appears just after the most recently inserted code point, indicating both n (the value preceeding the asterisk) and i (the position of the value just after the asterisk). Other numerical values are decimal.

   Decoding trace of example B from section 7.1:

Decoding trace of example B from section 7.1:

   n is 128, i is 0, bias is 72
   input is "ihqwcrb4cv8a8dqg056pqjye"
   there is no delimiter, so extended string starts empty
   delta "ihq" decodes to 19853
   bias becomes 21
   4E0D *
   delta "wc" decodes to 64
   bias becomes 20
   4E0D 4E2D *
   delta "rb" decodes to 37
   bias becomes 13
   4E3A * 4E0D 4E2D
   delta "4c" decodes to 56
   bias becomes 17
   4E3A 4E48 * 4E0D 4E2D
   delta "v8a" decodes to 599
   bias becomes 32
   4E3A 4EC0 * 4E48 4E0D 4E2D
   delta "8d" decodes to 130
   bias becomes 23
   4ED6 * 4E3A 4EC0 4E48 4E0D 4E2D
   delta "qg" decodes to 154
   bias becomes 25
   4ED6 4EEC * 4E3A 4EC0 4E48 4E0D 4E2D
   delta "056p" decodes to 46301
   bias becomes 84
   4ED6 4EEC 4E3A 4EC0 4E48 4E0D 4E2D 6587 *
   delta "qjye" decodes to 88531
   bias becomes 90
   4ED6 4EEC 4E3A 4EC0 4E48 4E0D 8BF4 * 4E2D 6587

n is 128, i is 0, bias is 72 input is "ihqwcrb4cv8a8dqg056pqjye" there is no delimiter, so extended string starts empty delta "ihq" decodes to 19853 bias becomes 21 4E0D * delta "wc" decodes to 64 bias becomes 20 4E0D 4E2D * delta "rb" decodes to 37 bias becomes 13 4E3A * 4E0D 4E2D delta "4c" decodes to 56 bias becomes 17 4E3A 4E48 * 4E0D 4E2D delta "v8a" decodes to 599 bias becomes 32 4E3A 4EC0 * 4E48 4E0D 4E2D delta "8d" decodes to 130 bias becomes 23 4ED6 * 4E3A 4EC0 4E48 4E0D 4E2D delta "qg" decodes to 154 bias becomes 25 4ED6 4EEC * 4E3A 4EC0 4E48 4E0D 4E2D delta "056p" decodes to 46301 bias becomes 84 4ED6 4EEC 4E3A 4EC0 4E48 4E0D 4E2D 6587 * delta "qjye" decodes to 88531 bias becomes 90 4ED6 4EEC 4E3A 4EC0 4E48 4E0D 8BF4 * 4E2D 6587

Costello                    Standards Track                    [Page 17]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 17] RFC 3492 IDNA Punycode March 2003

   Decoding trace of example L from section 7.1:

Decoding trace of example L from section 7.1:

   n is 128, i is 0, bias is 72
   input is "3B-ww4c5e180e575a65lsy2b"
   literal portion is "3B-", so extended string starts as:
   0033 0042
   delta "ww4c" decodes to 62042
   bias becomes 27
   0033 0042 5148 *
   delta "5e" decodes to 139
   bias becomes 24
   0033 0042 516B * 5148
   delta "180e" decodes to 16683
   bias becomes 67
   0033 5E74 * 0042 516B 5148
   delta "575a" decodes to 34821
   bias becomes 82
   0033 5E74 0042 516B 5148 751F *
   delta "65l" decodes to 14592
   bias becomes 67
   0033 5E74 0042 7D44 * 516B 5148 751F
   delta "sy2b" decodes to 42088
   bias becomes 84
   0033 5E74 0042 7D44 91D1 * 516B 5148 751F

n is 128, i is 0, bias is 72 input is "3B-ww4c5e180e575a65lsy2b" literal portion is "3B-", so extended string starts as: 0033 0042 delta "ww4c" decodes to 62042 bias becomes 27 0033 0042 5148 * delta "5e" decodes to 139 bias becomes 24 0033 0042 516B * 5148 delta "180e" decodes to 16683 bias becomes 67 0033 5E74 * 0042 516B 5148 delta "575a" decodes to 34821 bias becomes 82 0033 5E74 0042 516B 5148 751F * delta "65l" decodes to 14592 bias becomes 67 0033 5E74 0042 7D44 * 516B 5148 751F delta "sy2b" decodes to 42088 bias becomes 84 0033 5E74 0042 7D44 91D1 * 516B 5148 751F

Costello                    Standards Track                    [Page 18]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 18] RFC 3492 IDNA Punycode March 2003

7.3 Encoding traces

7.3 Encoding traces

   In the following traces, code point values are hexadecimal, while
   other numerical values are decimal.

In the following traces, code point values are hexadecimal, while other numerical values are decimal.

   Encoding trace of example B from section 7.1:

Encoding trace of example B from section 7.1:

   bias is 72
   input is:
   4ED6 4EEC 4E3A 4EC0 4E48 4E0D 8BF4 4E2D 6587
   there are no basic code points, so no literal portion
   next code point to insert is 4E0D
   needed delta is 19853, encodes as "ihq"
   bias becomes 21
   next code point to insert is 4E2D
   needed delta is 64, encodes as "wc"
   bias becomes 20
   next code point to insert is 4E3A
   needed delta is 37, encodes as "rb"
   bias becomes 13
   next code point to insert is 4E48
   needed delta is 56, encodes as "4c"
   bias becomes 17
   next code point to insert is 4EC0
   needed delta is 599, encodes as "v8a"
   bias becomes 32
   next code point to insert is 4ED6
   needed delta is 130, encodes as "8d"
   bias becomes 23
   next code point to insert is 4EEC
   needed delta is 154, encodes as "qg"
   bias becomes 25
   next code point to insert is 6587
   needed delta is 46301, encodes as "056p"
   bias becomes 84
   next code point to insert is 8BF4
   needed delta is 88531, encodes as "qjye"
   bias becomes 90
   output is "ihqwcrb4cv8a8dqg056pqjye"

bias is 72 input is: 4ED6 4EEC 4E3A 4EC0 4E48 4E0D 8BF4 4E2D 6587 there are no basic code points, so no literal portion next code point to insert is 4E0D needed delta is 19853, encodes as "ihq" bias becomes 21 next code point to insert is 4E2D needed delta is 64, encodes as "wc" bias becomes 20 next code point to insert is 4E3A needed delta is 37, encodes as "rb" bias becomes 13 next code point to insert is 4E48 needed delta is 56, encodes as "4c" bias becomes 17 next code point to insert is 4EC0 needed delta is 599, encodes as "v8a" bias becomes 32 next code point to insert is 4ED6 needed delta is 130, encodes as "8d" bias becomes 23 next code point to insert is 4EEC needed delta is 154, encodes as "qg" bias becomes 25 next code point to insert is 6587 needed delta is 46301, encodes as "056p" bias becomes 84 next code point to insert is 8BF4 needed delta is 88531, encodes as "qjye" bias becomes 90 output is "ihqwcrb4cv8a8dqg056pqjye"

Costello                    Standards Track                    [Page 19]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 19] RFC 3492 IDNA Punycode March 2003

   Encoding trace of example L from section 7.1:

Encoding trace of example L from section 7.1:

   bias is 72
   input is:
   0033 5E74 0042 7D44 91D1 516B 5148 751F
   basic code points (0033, 0042) are copied to literal portion: "3B-"
   next code point to insert is 5148
   needed delta is 62042, encodes as "ww4c"
   bias becomes 27
   next code point to insert is 516B
   needed delta is 139, encodes as "5e"
   bias becomes 24
   next code point to insert is 5E74
   needed delta is 16683, encodes as "180e"
   bias becomes 67
   next code point to insert is 751F
   needed delta is 34821, encodes as "575a"
   bias becomes 82
   next code point to insert is 7D44
   needed delta is 14592, encodes as "65l"
   bias becomes 67
   next code point to insert is 91D1
   needed delta is 42088, encodes as "sy2b"
   bias becomes 84
   output is "3B-ww4c5e180e575a65lsy2b"

bias is 72 input is: 0033 5E74 0042 7D44 91D1 516B 5148 751F basic code points (0033, 0042) are copied to literal portion: "3B-" next code point to insert is 5148 needed delta is 62042, encodes as "ww4c" bias becomes 27 next code point to insert is 516B needed delta is 139, encodes as "5e" bias becomes 24 next code point to insert is 5E74 needed delta is 16683, encodes as "180e" bias becomes 67 next code point to insert is 751F needed delta is 34821, encodes as "575a" bias becomes 82 next code point to insert is 7D44 needed delta is 14592, encodes as "65l" bias becomes 67 next code point to insert is 91D1 needed delta is 42088, encodes as "sy2b" bias becomes 84 output is "3B-ww4c5e180e575a65lsy2b"

8. Security Considerations

8. Security Considerations

   Users expect each domain name in DNS to be controlled by a single
   authority.  If a Unicode string intended for use as a domain label
   could map to multiple ACE labels, then an internationalized domain
   name could map to multiple ASCII domain names, each controlled by a
   different authority, some of which could be spoofs that hijack
   service requests intended for another.  Therefore Punycode is
   designed so that each Unicode string has a unique encoding.

Users expect each domain name in DNS to be controlled by a single authority. If a Unicode string intended for use as a domain label could map to multiple ACE labels, then an internationalized domain name could map to multiple ASCII domain names, each controlled by a different authority, some of which could be spoofs that hijack service requests intended for another. Therefore Punycode is designed so that each Unicode string has a unique encoding.

   However, there can still be multiple Unicode representations of the
   "same" text, for various definitions of "same".  This problem is
   addressed to some extent by the Unicode standard under the topic of
   canonicalization, and this work is leveraged for domain names by
   Nameprep [NAMEPREP].

However, there can still be multiple Unicode representations of the "same" text, for various definitions of "same". This problem is addressed to some extent by the Unicode standard under the topic of canonicalization, and this work is leveraged for domain names by Nameprep [NAMEPREP].

Costello                    Standards Track                    [Page 20]

RFC 3492                     IDNA Punycode                    March 2003

Costello Standards Track [Page 20] RFC 3492 IDNA Punycode March 2003

9. References

9. References

9.1 Normative References

9.1 Normative References

   [RFC2119]    Bradner, S., "Key words for use in RFCs to Indicate
                Requirement Levels", BCP 14, RFC 2119, March 1997.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

9.2 Informative References

9.2 Informative References

   [RFC952]     Harrenstien, K., Stahl, M. and E. Feinler, "DOD Internet
                Host Table Specification", RFC 952, October 1985.

[RFC952] HarrenstienとK.とスタールとM.とE.Feinler、「DODインターネットホストテーブル仕様」、RFC952、1985年10月。

   [RFC1034]    Mockapetris, P., "Domain Names - Concepts and
                Facilities", STD 13, RFC 1034, November 1987.

[RFC1034]Mockapetris、P.、「ドメイン名--、概念と施設、」、STD13、RFC1034、11月1987日

   [IDNA]       Faltstrom, P., Hoffman, P. and A. Costello,
                "Internationalizing Domain Names in Applications
                (IDNA)", RFC 3490, March 2003.

[IDNA] FaltstromとP.とホフマンとP.とA.コステロ、「アプリケーション(IDNA)におけるドメイン名を国際的にします」、RFC3490、2003年3月。

   [NAMEPREP]   Hoffman, P. and  M. Blanchet, "Nameprep: A Stringprep
                Profile for Internationalized Domain Names (IDN)", RFC
                3491, March 2003.

[NAMEPREP] ホフマン、P.、およびM.Blanchet、「Nameprep:」 「国際化ドメイン名(IDN)のためのStringprepプロフィール」、RFC3491、2003年3月。

   [ASCII]      Cerf, V., "ASCII format for Network Interchange", RFC
                20, October 1969.

[ASCII] サーフ、V.、「Network InterchangeのためのASCII書式」、RFC20、1969年10月。

   [PROVINCIAL] Kaplan, M., "The 'anyone can be provincial!' page",
                http://www.trigeminal.com/samples/provincial.html.

[PROVINCIAL]キャプラン、M.、「'だれでも地方である場合がある!'というページ」 http://www.trigeminal.com/samples/provincial.html 。

   [UNICODE]    The Unicode Consortium, "The Unicode Standard",
                http://www.unicode.org/unicode/standard/standard.html.

[ユニコード] ユニコード共同体、「ユニコード規格」、 http://www.unicode.org/unicode/standard/standard.html 。

Costello                    Standards Track                    [Page 21]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[21ページ]。

A. Mixed-case annotation

A。 Mixedケース注釈

   In order to use Punycode to represent case-insensitive strings,
   higher layers need to case-fold the strings prior to Punycode
   encoding.  The encoded string can use mixed case as an annotation
   telling how to convert the folded string into a mixed-case string for
   display purposes.  Note, however, that mixed-case annotation is not
   used by the ToASCII and ToUnicode operations specified in [IDNA], and
   therefore implementors of IDNA can disregard this appendix.

大文字と小文字を区別しないストリングを表すのにPunycodeを使用するために、より高い層はPunycodeコード化の前にケース倍にストリングを必要とします。 コード化されたストリングは表示目的のために複雑なケースストリングに折り重ねられたストリングを変換する方法を教える注釈として複雑なケースを使用できます。 しかしながら、複雑なケース注釈が[IDNA]で指定されたToASCIIとToUnicode操作で使用されないことに注意してください。そうすれば、したがって、IDNAの作成者はこの付録を無視できます。

   Basic code points can use mixed case directly, because the decoder
   copies them verbatim, leaving lowercase code points lowercase, and
   leaving uppercase code points uppercase.  Each non-basic code point
   is represented by a delta, which is represented by a sequence of
   basic code points, the last of which provides the annotation.  If it
   is uppercase, it is a suggestion to map the non-basic code point to
   uppercase (if possible); if it is lowercase, it is a suggestion to
   map the non-basic code point to lowercase (if possible).

基本コードポイントは直接複雑なケースを使用できます、デコーダがそれらを逐語的にコピーするので、小文字のコード・ポイントを小文字でおいて、大文字しているコード・ポイントを大文字した状態でおいて。 それぞれの非基本コードポイントはデルタのそばに表されます。(デルタは基本コードポイントの系列によって表されます)。その最終は注釈を提供します。 大文字するなら、それは大文字する(できれば)ために非基本コードポイントを写像する提案です。 小文字であるなら、それは小文字で印刷する(できれば)ために非基本コードポイントを写像する提案です。

   These annotations do not alter the code points returned by decoders;
   the annotations are returned separately, for the caller to use or
   ignore.  Encoders can accept annotations in addition to code points,
   but the annotations do not alter the output, except to influence the
   uppercase/lowercase form of ASCII letters.

これらの注釈はデコーダによって返されたコード・ポイントを変更しません。 使用するか、または無視する訪問者のために別々に注釈を返します。 エンコーダはコード・ポイントに加えて注釈を受け入れることができますが、注釈は出力を変更しません、大文字しているか小文字の形式のASCII手紙に影響を及ぼすのを除いて。

   Punycode encoders and decoders need not support these annotations,
   and higher layers need not use them.

Punycodeエンコーダとデコーダはこれらの注釈を支持する必要はありません、そして、より高い層はそれらを使用する必要はありません。

B. Disclaimer and license

B。 注意書きとライセンス

   Regarding this entire document or any portion of it (including the
   pseudocode and C code), the author makes no guarantees and is not
   responsible for any damage resulting from its use.  The author grants
   irrevocable permission to anyone to use, modify, and distribute it in
   any way that does not diminish the rights of anyone else to use,
   modify, and distribute it, provided that redistributed derivative
   works do not contain misleading author or version information.
   Derivative works need not be licensed under similar terms.

それ(擬似コードとCコードを含んでいる)のこの全体のドキュメントかどんな部分に関しても、作者は、保証を全くしないで、また使用から生じるどんな損害にも責任がありません。 作者は他の誰もそれを使用して、変更して、分配する権利を減少させないどんな方法でもそれを使用して、変更して、分配するために呼び戻せない許可をだれにも与えます、再配付された派生している作品が紛らわしい作者かバージョン情報を含んでいなければ。 派生している作品は同類項に基づき認可される必要はありません。

Costello                    Standards Track                    [Page 22]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[22ページ]。

C. Punycode sample implementation

C。 Punycodeサンプル実現

/*
punycode.c from RFC 3492
http://www.nicemice.net/idn/
Adam M. Costello
http://www.nicemice.net/amc/

RFC3492 http://www.nicemice.net/idn/ アダムM.コステロ http://www.nicemice.net/amc/ からの/*punycode.c

This is ANSI C code (C89) implementing Punycode (RFC 3492).

これはPunycode(RFC3492)を実行するANSI Cコード(C89)です。

*/

*/

/************************************************************/
/* Public interface (would normally go in its own .h file): */

公共のインタフェース..通常..入る..ファイル */

#include <limits.h>

#<limits.h>を含めてください。

enum punycode_status {
  punycode_success,
  punycode_bad_input,   /* Input is invalid.                       */
  punycode_big_output,  /* Output would exceed the space provided. */
  punycode_overflow     /* Input needs wider integers to process.  */
};

enum punycode_状態{ punycode_成功、punycodeの_悪い_が入力されて、*が入力した/は無効です。 */_大きいpunycode_が出力されて、/*出力は提供されたスペースを超えているでしょう。 *punycode_オーバーフロー/*が入力した/は、処理するために、より広い整数を必要とします。 */ };

#if UINT_MAX >= (1 << 26) - 1
typedef unsigned int punycode_uint;
#else
typedef unsigned long punycode_uint;
#endif

#_UINTであるなら、MAX>は(1<<26)と等しいです--1typedefの無記名のint punycode_uint #ほかのtypedef無記名の長いpunycode_uint。 #endif

enum punycode_status punycode_encode(
  punycode_uint input_length,
  const punycode_uint input[],
  const unsigned char case_flags[],
  punycode_uint *output_length,
  char output[] );

enum punycode_状態は_エンコードをpunycodeします。(punycode_uintの入力_長さ(const punycode_uint入力[]、constの無記名の炭のケース_旗[]、punycode_uint*出力_長さ)は出力[] )を炭にします。

    /* punycode_encode() converts Unicode to Punycode.  The input     */
    /* is represented as an array of Unicode code points (not code    */
    /* units; surrogate pairs are not allowed), and the output        */
    /* will be represented as an array of ASCII code points.  The     */
    /* output string is *not* null-terminated; it will contain        */
    /* zeros if and only if the input contains zeros.  (Of course     */
    /* the caller can leave room for a terminator and add one if      */
    /* needed.)  The input_length is the number of code points in     */
    /* the input.  The output_length is an in/out argument: the       */
    /* caller passes in the maximum number of code points that it     */

/*punycode_エンコード()はユニコードをPunycodeに変換します。 ユニコードコードの勢ぞろいが指すとき(コード*//*ユニット; 代理の組でないのは許容されていません)、入力*//*は表されます、そして、ASCIIコードの勢ぞろいが指すとき、出力*//*は表されるでしょう。 *//*出力ストリングは*でないのがヌル終えた*です。 そして、*//*ゼロを含む、入力がゼロを含んでいる場合にだけ。 (*訪問者が残すことができる//*は、もちろん、ターミネータのために同居して、*必要であることで、*//であるなら1つを加えます。) 入力_長さはコードの数が*//*で入力を指すということです。 出力_長さは議論からのコネ/です: 最大における*訪問者パスが付番するコードの*//がそれを指す、それ、*/

Costello                    Standards Track                    [Page 23]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[23ページ]。

    /* can receive, and on successful return it will contain the      */
    /* number of code points actually output.  The case_flags array   */
    /* holds input_length boolean values, where nonzero suggests that */
    /* the corresponding Unicode character be forced to uppercase     */
    /* after being decoded (if possible), and zero suggests that      */
    /* it be forced to lowercase (if possible).  ASCII code points    */
    /* are encoded literally, except that ASCII letters are forced    */
    /* to uppercase or lowercase according to the corresponding       */
    /* uppercase flags.  If case_flags is a null pointer then ASCII   */
    /* letters are left as they are, and other code points are        */
    /* treated as if their uppercase flags were zero.  The return     */
    /* value can be any of the punycode_status values defined above   */
    /* except punycode_bad_input; if not punycode_success, then       */
    /* output_size and output might contain garbage.                  */

/*は受信されることができます、そして、うまくいっているリターンでは、それは実際に出力されたコード・ポイントの*//*番号を含むでしょう。 アレイ*//*が保持するケース_旗が_非零がその*//*を示す長さのブール値を入力した、対応するユニコード文字、*//は*後に解読されながら(できれば)、大文字させられてください。そうすれば、ゼロは小文字で印刷するのが(できれば)無理矢理その*//*を示します。 ASCIIコード・ポイント*//*は文字通りコード化されます、ASCII手紙が対応する*//*大文字旗に従って、大文字するか、または小文字で印刷する無理矢理の*//*であるのを除いて。 _が旗を揚げさせるケースがヌルポインタであるなら、それらは左ですが、ASCII*//*手紙はそうです、そして、他のコード・ポイントはまるでそれらの大文字している旗がゼロであるかのように扱われた*//*です。 リターン*//*値は悪い_が入力したpunycode_を除いて、punycode_状態値のどれかが*の上で//*を定義したということであるかもしれません。 punycode_成功でないなら*//*出力_サイズであり、出力はゴミを含むかもしれません。 */

enum punycode_status punycode_decode(
  punycode_uint input_length,
  const char input[],
  punycode_uint *output_length,
  punycode_uint output[],
  unsigned char case_flags[] );

enum punycode_状態punycode_は解読します。(punycode_uintは_の長さ、const炭の入力[]、punycode_uint*出力_長さ、punycode_uint出力[]、無記名の炭のケース_フラグ[] )を入力しました。

    /* punycode_decode() converts Punycode to Unicode.  The input is  */
    /* represented as an array of ASCII code points, and the output   */
    /* will be represented as an array of Unicode code points.  The   */
    /* input_length is the number of code points in the input.  The   */
    /* output_length is an in/out argument: the caller passes in      */
    /* the maximum number of code points that it can receive, and     */
    /* on successful return it will contain the actual number of      */
    /* code points output.  The case_flags array needs room for at    */
    /* least output_length values, or it can be a null pointer if the */
    /* case information is not needed.  A nonzero flag suggests that  */
    /* the corresponding Unicode character be forced to uppercase     */
    /* by the caller (if possible), while zero suggests that it be    */
    /* forced to lowercase (if possible).  ASCII code points are      */
    /* output already in the proper case, but their flags will be set */
    /* appropriately so that applying the flags would be harmless.    */
    /* The return value can be any of the punycode_status values      */
    /* defined above; if not punycode_success, then output_length,    */
    /* output, and case_flags might contain garbage.  On success, the */
    /* decoder will never need to write an output_length greater than */
    /* input_length, because of how the encoding is defined.          */

/*punycode_は() 転向者Punycodeをユニコードに解読します。 入力はユニコードコードの勢ぞろいが指すときASCIIコード・ポイントのアレイ、および出力*//*が表されるように*が表した*//です。 *//*入力_長さは入力で、コード・ポイントの数です。 *//*出力_長さは議論からのコネ/です: *訪問者は*//*で受信できるというコード・ポイントの最大数を通過します、そして、それがそうするうまくいっているリターンでの//*は*コード・ポイントが出力した*//の実数を含んでいます。 *//*ケース情報は必要でないなら、アレイの必要性が*//*最少出力_長さ値、またはそれで同居するケース_旗がヌルポインタであるかもしれません。 非零旗はその*//を示します。*訪問者(できれば)で対応するユニコード文字がやむを得ず*//*を大文字して、ゼロは、それが*であると示唆しますが、//*によってやむを得ず小文字で印刷しました(できれば)。 ASCIIコード・ポイントは適切な場合で既に*//*出力ですが、それらの旗は、適切に旗を適用するのが無害であるためのセット*//*でしょう。 *//*が定義したpunycode_状態値*のどれかが上であったなら、リターンが評価する//*はそうすることができます。 punycode_成功でないなら、出力_の長さ、*//*出力、およびケース_フラグはゴミを含むかもしれません。 成功では、*//*デコーダは、決して*//*が_長さを入力したより大きい出力_長さを書く必要がないでしょう、コード化がどう定義されるかので。 */

/**********************************************************/
/* Implementation (would normally go in its own .c file): */

実現..通常..入る..ファイル */

#include <string.h>

#<string.h>を含めてください。

Costello                    Standards Track                    [Page 24]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[24ページ]。

/*** Bootstring parameters for Punycode ***/

Punycode***/のためのパラメタをBootstringする/***

enum { base = 36, tmin = 1, tmax = 26, skew = 38, damp = 700,
       initial_bias = 72, initial_n = 0x80, delimiter = 0x2D };

enumは36(=1(tmax=26)が歪曲するtmin=38)がじめじめとする==700、初期の_バイアス=72、イニシャル=0×80、デリミタ=0x2Dを基礎づけます。

/* basic(cp) tests whether cp is a basic code point: */
#define basic(cp) ((punycode_uint)(cp) < 0x80)

/*基本的な(cp)テストはcpが基本コードであるか否かに関係なく、指します: */#は基本的な(cp)を定義します。((punycode_uint)(cp)<0x80)

/* delim(cp) tests whether cp is a delimiter: */
#define delim(cp) ((cp) == delimiter)

/*delim(cp)はcpがデリミタであるか否かに関係なく、テストされます: */#はdelim(cp)を定義します。((cp)=デリミタ)

/* decode_digit(cp) returns the numeric value of a basic code */
/* point (for use in representing integers) in the range 0 to */
/* base-1, or base if cp is does not represent a value.       */

/*が_(cp)が範囲0の基本コード*//*ポイント(整数を表すことにおける使用のための)の数値を返すケタを*//*ベース-1に解読するか、またはcpがあるなら、ベースは値を表しません。 */

static punycode_uint decode_digit(punycode_uint cp)
{
  return  cp - 48 < 10 ? cp - 22 :  cp - 65 < 26 ? cp - 65 :
          cp - 97 < 26 ? cp - 97 :  base;
}

静的なpunycode_uintは_ケタ(punycode_uint cp)を解読します。cp--48<10?cp--22を返してください: cp(65<26)は97をcpします(: cp(97<26)がcpする65): ベース

/* encode_digit(d,flag) returns the basic code point whose value      */
/* (when used for representing integers) is d, which needs to be in   */
/* the range 0 to base-1.  The lowercase form is used unless flag is  */
/* nonzero, in which case the uppercase form is used.  The behavior   */
/* is undefined if flag is nonzero and digit d has no uppercase form. */

/*エンコード_ケタ(d、弛む)は値*//*(整数を表すのに使用されると)が*//*の範囲0である必要があるdである基本コードポイントをベース-1に返します。 小文字のフォームが旗が*//*非零でないなら使用されている、その場合、大文字しているフォームは使用されています。 旗が非零であり、大文字が全くケタdによって形成されないなら、振舞い*//*は未定義です。 */

static char encode_digit(punycode_uint d, int flag)
{
  return d + 22 + 75 * (d < 26) - ((flag != 0) << 5);
  /*  0..25 map to ASCII a..z or A..Z */
  /* 26..35 map to ASCII 0..9         */
}

静的な炭のエンコード_ケタ(punycode_uint d、int旗)d+22+75*(d<26)--((旗!=0)<<5); /にASCII a..zへの*0.25地図かASCII0.9*/へのA..Z*//*26.35地図を返してください。

/* flagged(bcp) tests whether a basic code point is flagged */
/* (uppercase).  The behavior is undefined if bcp is not a  */
/* basic code point.                                        */

/*は基本コードポイントが旗を揚げさせられた*//*(大文字する)であるか否かに関係なく、(bcp)テストに旗を揚げさせました。 振舞いはbcpが*//*基本コードポイントでないなら未定義です。 */

#define flagged(bcp) ((punycode_uint)(bcp) - 65 < 26)

#旗を揚げられて(bcp)、定義します。((punycode_uint)(bcp)--65<26)

/* encode_basic(bcp,flag) forces a basic code point to lowercase */
/* if flag is zero, uppercase if flag is nonzero, and returns    */
/* the resulting code point.  The code point is unchanged if it  */
/* is caseless.  The behavior is undefined if bcp is not a basic */
/* code point.                                                   */

基本コードが*旗がゼロ、大文字であるなら旗が非零であり、*//*に結果になることを返すなら*//を小文字で印刷するために指す(bcp、弛んでください)/*エンコード_基本的な力はポイントをコード化します。 コード・ポイントはそれであるなら変わりがありません。*//*はcaselessです。 振舞いはbcpが基本的な*//*コード・ポイントでないなら未定義です。 */

static char encode_basic(punycode_uint bcp, int flag)
{

静的な炭のエンコード_基本的(punycode_uint bcp、int旗)

Costello                    Standards Track                    [Page 25]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[25ページ]。

  bcp -= (bcp - 97 < 26) << 5;
  return bcp + ((!flag && (bcp - 65 < 26)) << 5);
}

bcp-=(bcp--97<26)<<5。 bcp+を返してください、(旗、(bcp--65<26) <<5)。 }

/*** Platform-specific constants ***/

/***プラットホーム特有の定数***/

/* maxint is the maximum value of a punycode_uint variable: */
static const punycode_uint maxint = -1;
/* Because maxint is unsigned, -1 becomes the maximum value. */

/*maxintはpunycode_uint変数の最大値です: */静的なconst punycode_uint maxintは-1と等しいです。 /が*maxintであるので無記名である、-1は最大値になります。 */

/*** Bias adaptation function ***/

/***バイアス適合機能***/

static punycode_uint adapt(
  punycode_uint delta, punycode_uint numpoints, int firsttime )
{
  punycode_uint k;

静的なpunycode_がuintに(punycode_uintデルタ、punycode_uint numpoints、int firsttime)を適合させる、punycode_uint k。

  delta = firsttime ? delta / damp : delta >> 1;
  /* delta >> 1 is a faster way of doing delta / 2 */
  delta += delta / numpoints;

デルタ=firsttime--デルタ/湿る: デルタ>>1。 /*デルタ>>1はデルタ/2*/デルタ+=デルタ/numpointsをするより速い方法です。

  for (k = 0;  delta > ((base - tmin) * tmax) / 2;  k += base) {
    delta /= base - tmin;
  }

(k=0; デルタ>((ベース--tmin)*tmax)/2; k+=ベース)にデルタ/=ベース(tmin)

  return k + (base - tmin + 1) * delta / (delta + skew);
}

+ (ベース--tmin+1)*デルタ/(デルタ+斜行)をkに返してください。 }

/*** Main encode function ***/

/***主なエンコード機能***/

enum punycode_status punycode_encode(
  punycode_uint input_length,
  const punycode_uint input[],
  const unsigned char case_flags[],
  punycode_uint *output_length,
  char output[] )
{
  punycode_uint n, delta, h, b, out, max_out, bias, j, m, q, k, t;

enum punycode_状態は_エンコードをpunycodeします。(punycode_uintの入力_長さ、const punycode_uint入力[]、constの無記名の炭のケース_旗[]、punycode_uint*が_長さを出力する、出力[] )を炭にしてください、uint n、デルタ、h、最大_が外にあるbが偏るpunycode_、j、m、q、k、t。

  /* Initialize the state: */

/*は状態を初期化します: */

  n = initial_n;
  delta = out = 0;
  max_out = *output_length;
  bias = initial_bias;

nはイニシャルと等しいです。 デルタは出かけている=0と等しいです。 最大_アウト=*は_長さを出力しました。 バイアスは初期の_バイアスと等しいです。

  /* Handle the basic code points: */

基本コードが向ける/*ハンドル: */

Costello                    Standards Track                    [Page 26]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[26ページ]。

  for (j = 0;  j < input_length;  ++j) {
    if (basic(input[j])) {
      if (max_out - out < 2) return punycode_big_output;
      output[out++] =
        case_flags ?  encode_basic(input[j], case_flags[j]) : input[j];
    }
    /* else if (input[j] < n) return punycode_bad_input; */
    /* (not needed for Punycode with unsigned code points) */
  }

(j=0; j<の入力_長さ; + + j)のために(<2から出ている最大_)であるなら、_大きい_出力をpunycodeに返してください; 出力[+ +からの]はケース_旗と等しいです--_基礎をコード化してください。(基本的である、([j]))を入力してください、([j]を入力してください、ケース_旗[j]): [j]を入力してください;、悪い_が入力した/*ほかの、しかし、(入力[j]<n)リターンpunycodeな_; *//*(無記名のコード・ポイントがあるPunycodeに必要でない)*/

  h = b = out;

h=bはアウトと等しいです。

  /* h is the number of code points that have been handled, b is the  */
  /* number of basic code points, and out is the number of characters */
  /* that have been output.                                           */

/*hは扱われたコード・ポイントの数です、bが基本コードポイントの*//*番号です、そして、外に、出力であるキャラクタ*//*の数があります。 */

  if (b > 0) output[out++] = delimiter;

(b>0)が=デリミタを出力したなら[+ +から]。

  /* Main encoding loop: */

輪をコード化する/*メイン: */

  while (h < input_length) {
    /* All non-basic code points < n have been     */
    /* handled already.  Find the next larger one: */

/*非基本コードポイント<nは既に扱われた*//*です。(h<の入力_長さ)である、次の大きいものを見つけてください: */

    for (m = maxint, j = 0;  j < input_length;  ++j) {
      /* if (basic(input[j])) continue; */
      /* (not needed for Punycode) */
      if (input[j] >= n && input[j] < m) m = input[j];
    }

(m=maxint、j=0; j<の入力_長さ; + + j)のために/*、(基本的である、([j])) 入力されて、続いてください; *//*(Punycodeに必要でない)*/、(入力[j]>がnと等しい、入力[j]<m) m=は[j]を入力しました。

    /* Increase delta enough to advance the decoder's    */
    /* <n,i> state to <m,0>, but guard against overflow: */

/*は、<mへのデコーダの*//*<nを進めることができるくらいのデルタi>状態、0>を増加させますが、オーバーフローに用心します: */

    if (m - n > (maxint - delta) / (h + 1)) return punycode_overflow;
    delta += (m - n) * (h + 1);
    n = m;

_(m--n>(maxint--デルタ)/(h+1))リターンpunycodeであるなら、あふれてください。 デルタ+=(m--n)*(h+1)。 n=m。

    for (j = 0;  j < input_length;  ++j) {
      /* Punycode does not need to check whether input[j] is basic: */
      if (input[j] < n /* || basic(input[j]) */ ) {
        if (++delta == 0) return punycode_overflow;
      }

(j=0; j<の入力_長さ; + + j)、/*Punycodeが、入力[j]は基本です: */チェックする必要はない、([j] <n/*| | 基礎(入力[j])*/)を入力してください。_(+ + デルタ=0)がpunycodeを返すなら、あふれてください。

      if (input[j] == n) {
        /* Represent delta as a generalized variable-length integer: */

(入力[j]=n)である、/*はaは可変長の整数を一般化しました: */によってデルタを表します。

        for (q = delta, k = base;  ;  k += base) {
          if (out >= max_out) return punycode_big_output;

(qはデルタ、k=ベースと等しいです; k+=ベース)、(出ている>=最大_アウト)であるなら、_大きい_出力をpunycodeに返してください。

Costello                    Standards Track                    [Page 27]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[27ページ]。

          t = k <= bias /* + tmin */ ? tmin :     /* +tmin not needed */
              k >= bias + tmax ? tmax : k - bias;
          if (q < t) break;
          output[out++] = encode_digit(t + (q - t) % (base - t), 0);
          q = (q - t) / (base - t);
        }

偏見/*+tmin*/?k t=<=tmin: /*+tminは偏見+tmax?*/k>=tmaxを必要としませんでした: k--バイアス。 (q<t)であるなら、壊れてください。 出力[+ +からの]はエンコード_ケタ(t+(q--t)%(ベース--t)、0)と等しいです。 qは(q--t)/(ベース--t)と等しいです。 }

        output[out++] = encode_digit(q, case_flags && case_flags[j]);
        bias = adapt(delta, h + 1, h == b);
        delta = 0;
        ++h;
      }
    }

出力[+ +からの]=エンコード_ケタ、(q、ケース_フラグ、ケース_は[j])に旗を揚げさせます。 バイアス=は(デルタ、h+1、h=b)を適合させます。 デルタ=0。 + + h。 } }

    ++delta, ++n;
  }

+ + + + デルタ、n。 }

  *output_length = out;
  return punycode_success;
}

*output_長さはアウトと等しいです。 punycode_成功を返してください。 }

/*** Main decode function ***/

/***メインは機能***/を解読します。

enum punycode_status punycode_decode(
  punycode_uint input_length,
  const char input[],
  punycode_uint *output_length,
  punycode_uint output[],
  unsigned char case_flags[] )
{
  punycode_uint n, out, i, max_out, bias,
                 b, j, in, oldi, w, k, digit, t;

enum punycode_状態punycode_は解読します。(punycode_uintの入力_長さ、constは入力[]を炭にします、punycode_uint*出力_長さ、punycode_uint出力[]、無記名の炭のケース_が[] )に旗を揚げさせる、punycode_uint n、アウト、私が_に最大限にします、バイアス、b、j、コネ、oldi、w、k、ケタ、t。

  /* Initialize the state: */

/*は状態を初期化します: */

  n = initial_n;
  out = i = 0;
  max_out = *output_length;
  bias = initial_bias;

nはイニシャルと等しいです。 出かけている=i=0。 最大_アウト=*は_長さを出力しました。 バイアスは初期の_バイアスと等しいです。

  /* Handle the basic code points:  Let b be the number of input code */
  /* points before the last delimiter, or 0 if there is none, then    */
  /* copy the first b code points to the output.                      */

基本コードが向ける/*ハンドル: bが入力コード*の数であることをさせてください。//*は最後のデリミタの前に指すか、そこであるなら、0がなにもであり、次に、*//*コピーは出力への最初bのコード・ポイントです。 */

  for (b = j = 0;  j < input_length;  ++j) if (delim(input[j])) b = j;
  if (b > max_out) return punycode_big_output;

(b=j=0; j<の入力_長さ; + + j)、(delim、(入力[j]))bはjと等しいです。 (b>最大_が外にある状態で)リターンpunycode_の大きい_出力であるなら。

  for (j = 0;  j < b;  ++j) {

(j=0; j<b; + + j)

Costello                    Standards Track                    [Page 28]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[28ページ]。

    if (case_flags) case_flags[out] = flagged(input[j]);
    if (!basic(input[j])) return punycode_bad_input;
    output[out++] = input[j];
  }

(ケース_旗)が_旗をケースに入れるなら、[out]=は弛みました。([j])を入力してください。 (基礎、([j])) 悪い_が入力したリターンpunycode_を入力してください。 出力[+ +からの]は入力[j]と等しいです。 }

  /* Main decoding loop:  Start just after the last delimiter if any  */
  /* basic code points were copied; start at the beginning otherwise. */

/*メイン解読輪: 何か*//*基本コードが指すなら最後のデリミタがコピーされたすぐ後に始まってください。 そうでなければ、始めに始まってください。 */

  for (in = b > 0 ? b + 1 : 0;  in < input_length;  ++out) {

(コネは<の入力_長さにおけるb>0?b+1:0と等しいです; + + アウト)

    /* in is the index of the next character to be consumed, and */
    /* out is the number of code points in the output array.     */

**中の/は次の消費されるべきキャラクタのインデックスです、そして、//*アウトは出力アレイのコード・ポイントの数です。 */

    /* Decode a generalized variable-length integer into delta,  */
    /* which gets added to i.  The overflow checking is easier   */
    /* if we increase i as we go, then subtract off its starting */
    /* value at the end to obtain delta.                         */

/*はデルタ、iに加えられる*//*に一般化された可変長の整数を解読します。 *私たちが私たちが行くのに従ってiを増加させて、次に、終わりにデルタを得るために始めの*//*価値で引くなら、オーバーフローの照合は、より簡単な*//です。 */

    for (oldi = i, w = 1, k = base;  ;  k += base) {
      if (in >= input_length) return punycode_bad_input;
      digit = decode_digit(input[in++]);
      if (digit >= base) return punycode_bad_input;
      if (digit > (maxint - i) / w) return punycode_overflow;
      i += digit * w;
      t = k <= bias /* + tmin */ ? tmin :     /* +tmin not needed */
          k >= bias + tmax ? tmax : k - bias;
      if (digit < t) break;
      if (w > maxint / (base - t)) return punycode_overflow;
      w *= (base - t);
    }

(oldi=i、w=1、k=ベース; k+=ベース)に{ if (in >= input_length) return punycode_bad_input; digit = decode_digit(input[in++]); if (digit >= base) return punycode_bad_input; if (digit > (maxint - i) / w) return punycode_overflow; i += digit * w; t = k <= bias /* + tmin */ ? tmin : /* +tmin not needed */ k >= bias + tmax ? tmax : k - bias; if (digit < t) break; if (w > maxint / (base - t)) return punycode_overflow; w *= (base - t); }

    bias = adapt(i - oldi, out + 1, oldi == 0);

バイアス=は適合します(i--+ 1、oldi=0からのoldi)。

    /* i was supposed to wrap around from out+1 to 0,   */
    /* incrementing n each time, so we'll fix that now: */

/*iは出かけている+1から0に巻きつけるべきでした、と*//*増加しているnがそれぞれ調節するので、私たちは現在、それを修理するつもりです: */

    if (i / (out + 1) > maxint - n) return punycode_overflow;
    n += i / (out + 1);
    i %= (out + 1);

_(i/(アウト+1)>maxint--n)リターンpunycodeであるなら、あふれてください。 n+=i/(アウト+1)。 i%=(アウト+1)。

    /* Insert n at position i of the output: */

出力の位置のiの/*差し込みn: */

    /* not needed for Punycode: */
    /* if (decode_digit(n) <= base) return punycode_invalid_input; */
    if (out >= max_out) return punycode_big_output;

Punycodeに必要でない/*: *//、*(_ケタ(n)<=ベースを解読します)リターンが無効の_が入力した_をpunycodeするなら。 */は(出ている>=最大_アウト)であるなら_大きい_出力をpunycodeに返します。

    if (case_flags) {
      memmove(case_flags + i + 1, case_flags + i, out - i);

(ケース_旗)である、memmove、(ケース_旗+i+1、ケース_旗+iアウト--i)。

Costello                    Standards Track                    [Page 29]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[29ページ]。

      /* Case of last character determines uppercase flag: */
      case_flags[i] = flagged(input[in - 1]);
    }

最後のキャラクタに関する/*ケースは大文字している旗を決定します: */ケース_旗[i]=は弛みました(入力されます[コネ--1])。 }

    memmove(output + i + 1, output + i, (out - i) * sizeof *output);
    output[i++] = n;
  }

memmove(出力+i+1、出力+i、(アウト--i)*sizeof*出力)。 出力[i++]はnと等しいです。 }

  *output_length = out;
  return punycode_success;
}

*output_長さはアウトと等しいです。 punycode_成功を返してください。 }

/******************************************************************/
/* Wrapper for testing (would normally go in a separate .c file): */

包装紙..テスト..通常..入る..別々..ファイル */

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#<assert.h>#インクルード<stdio.h>#インクルード<stdlib.h>#インクルード<string.h>を含めてください。

/* For testing, we'll just set some compile-time limits rather than */
/* use malloc(), and set a compile-time option rather than using a  */
/* command-line option.                                             */

テストするための/*、私たちは*//*よりむしろ限界が*//*コマンドラインのオプションを使用するよりむしろmalloc()を使用して、コンパイル時のオプションを設定するいくらかのコンパイル時にただセットするつもりです。 */

enum {
  unicode_max_length = 256,
  ace_max_length = 256
};

enum、ユニコード_最大_の長さ=256、エース_の最大_長さ=256。

static void usage(char **argv)
{
  fprintf(stderr,
    "\n"
    "%s -e reads code points and writes a Punycode string.\n"
    "%s -d reads a Punycode string and writes code points.\n"
    "\n"
    "Input and output are plain text in the native character set.\n"
    "Code points are in the form u+hex separated by whitespace.\n"
    "Although the specification allows Punycode strings to contain\n"
    "any characters from the ASCII repertoire, this test code\n"
    "supports only the printable characters, and needs the Punycode\n"
    "string to be followed by a newline.\n"
    "The case of the u in u+hex is the force-to-uppercase flag.\n"
    , argv[0], argv[0]);
  exit(EXIT_FAILURE);
}

静的な空の用法(炭の**argv){ 「fprintf、(stderr、」、\n」」 %s-eがコード・ポイントを読み込んで、a Punycodeストリング」 %s-dがコード・ポイント\n」に」 \n」を結んで、書くとPunycodeを読む\n」に「. 入出力されて、固有の文字の組のプレーンテキストは\nです」を書く、「空白\n切り離されたフォームu+十六進法にはコード・ポイントがあります」; Punycode\n」は「ニューライン\nがあとに続くのを結びます」。「仕様で、Punycodeストリングは\nを含むことができます」が、「ASCIIレパートリーからのどんなキャラクタ、このテストも\nをコード化する」、「印刷可能なキャラクタだけ、および必要性を支持する、「u+十六進法における、uに関するケースは大文字する力が. \nに旗を揚げさせるということです」、argv0、argv0); 出てください(出口_失敗); }

static void fail(const char *msg)

静的な空間は失敗します。(const炭*msg)

Costello                    Standards Track                    [Page 30]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[30ページ]。

{
  fputs(msg,stderr);
  exit(EXIT_FAILURE);
}

fputs(msg、stderr)(出口(EXIT_FAILURE))

static const char too_big[] =
  "input or output is too large, recompile with larger limits\n";
static const char invalid_input[] = "invalid input\n";
static const char overflow[] = "arithmetic overflow\n";
static const char io_error[] = "I/O error\n";

また、静的なconstは_大きい[]=「入力か出力が大き過ぎ、より大きい限界\nで再コンパイルしてください」を炭にします。 静的なconst炭の無効の_は[]=「無効の入力\n」を入力しました。 静的なconst炭オーバーフロー[]=「算術的溢れ\n」。 静的なconst炭のio_誤り[]=「入出力エラー\n」。

/* The following string is used to convert printable */
/* characters between ASCII and the native charset:  */

以下が結ぶ/*はASCIIとネイティブのcharsetの間の印刷可能な*//*キャラクタを変換するのに使用されます: */

static const char print_ascii[] =
  "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
  " !\"#$%&'()*+,-./"
  "0123456789:;<=>?"
  "@ABCDEFGHIJKLMNO"
  "PQRSTUVWXYZ[\\]^_"
  "`abcdefghijklmno"
  "pqrstuvwxyz{|}~\n";

<は>?」 "@ABCDEFGHIJKLMNO"「PQRSTUVWXYZ[\\]^_」と等しいです。

int main(int argc, char **argv)
{
  enum punycode_status status;
  int r;
  unsigned int input_length, output_length, j;
  unsigned char case_flags[unicode_max_length];

intメイン(int argc、炭の**argv)、enum punycode_状態状態; int r; 無記名のintの入力_長さ、出力_の長さ、j; 無記名の炭のケース_は[ユニコード_最大_の長さ]に旗を揚げさせます。

  if (argc != 2) usage(argv);
  if (argv[1][0] != '-') usage(argv);
  if (argv[1][2] != 0) usage(argv);

(argc!=2)用法(argv)であるなら。 (argv[1][0]!='--')用法(argv)であるなら。 (argv[1][2]!=0)用法(argv)であるなら。

  if (argv[1][1] == 'e') {
    punycode_uint input[unicode_max_length];
    unsigned long codept;
    char output[ace_max_length+1], uplus[3];
    int c;

(argv[1][1]='e')である、uintが入力したpunycode_[ユニコード_最大_の長さ]; 無記名の長いcodept; 出力[エース_最大_の長さ+1]、uplus[3]を炭にしてください; int c

    /* Read the input code points: */

/*は入力コード・ポイントを読みました: */

    input_length = 0;

_長さ=0を入力します。

    for (;;) {
      r = scanf("%2s%lx", uplus, &codept);
      if (ferror(stdin)) fail(io_error);

()、r=scanf(「%2%lx」、uplus、およびcodept)(ferror(stdin))のやり損ないである(io_誤り)なら

Costello                    Standards Track                    [Page 31]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[31ページ]。

      if (r == EOF || r == 0) break;

(r=EOF| | r=0)が壊れるなら。

      if (r != 2 || uplus[1] != '+' || codept > (punycode_uint)-1) {
        fail(invalid_input);
      }

(r!=2| | uplus[1]!は'+'と等しいです| | codept>(punycode_uint)-1)ならやり損な病人_入力()い。

      if (input_length == unicode_max_length) fail(too_big);

(ユニコード_最大_の入力_長さ=長さ)であるなら、失敗してください(_あまりに大きい)。

      if (uplus[0] == 'u') case_flags[input_length] = 0;
      else if (uplus[0] == 'U') case_flags[input_length] = 1;
      else fail(invalid_input);

(uplus[0]='u')ケース_が[入力_長さ]=0に旗を揚げさせるなら。 ほかに、(uplus[0]='U')であるなら、ケース_は[入力_長さ]=1に旗を揚げさせます。 ほかに、失敗してください(入力された無効の_)。

      input[input_length++] = codept;
    }

入力[入力_長さ++]はcodeptと等しいです。 }

    /* Encode: */

/*エンコード: */

    output_length = ace_max_length;
    status = punycode_encode(input_length, input, case_flags,
                             &output_length, output);
    if (status == punycode_bad_input) fail(invalid_input);
    if (status == punycode_big_output) fail(too_big);
    if (status == punycode_overflow) fail(overflow);
    assert(status == punycode_success);

出力_長さはエース_最大_の長さと等しいです。 状態はpunycode_エンコード(長さ、入力、ケース_フラグ、および出力_の長さが出力した入力_)と等しいです。 (悪い_が入力したpunycode状態=_)が(無効の_入力)に失敗するなら。 (punycodeの_の大きい_状態=出力)であるなら、失敗してください(_あまりに大きい)。 (状態=punycode_オーバーフロー)であるなら、失敗してください(あふれてください)。 (状態=punycode_成功)について断言してください。

    /* Convert to native charset and output: */

ネイティブのcharsetと出力への/*転向者: */

    for (j = 0;  j < output_length;  ++j) {
      c = output[j];
      assert(c >= 0 && c <= 127);
      if (print_ascii[c] == 0) fail(invalid_input);
      output[j] = print_ascii[c];
    }

(j=0; j<の出力_長さ; + + j)のためにcは出力[j]と等しいです;、断言、(c>=0、c<=127); (印刷_ASCII[c]=0)であるなら、(無効の_入力)に失敗してください; 出力[j]=印刷_ASCII[c]

    output[j] = 0;
    r = puts(output);
    if (r == EOF) fail(io_error);
    return EXIT_SUCCESS;
  }

[j] =0を出力してください。 r=は(出力)を置きます。 (r=EOF)が(io_誤り)に失敗するなら。 EXIT_SUCCESSを返してください。 }

  if (argv[1][1] == 'd') {
    char input[ace_max_length+2], *p, *pp;
    punycode_uint output[unicode_max_length];

'、(argv[1][1]=がそうするだろう、'、)、炭は[エース_最大_の長さ+2]、*p、*ppを入力しました; punycode_uint出力[ユニコード_最大_の長さ]

    /* Read the Punycode input string and convert to ASCII: */

/*はPunycode入力ストリングと転向者をASCIIに読み込みました: */

    fgets(input, ace_max_length+2, stdin);
    if (ferror(stdin)) fail(io_error);

fgets(入力、エース_最大_の長さ+2、stdin)。 (ferror(stdin))であるなら、(io_誤り)に失敗してください。

Costello                    Standards Track                    [Page 32]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[32ページ]。

    if (feof(stdin)) fail(invalid_input);
    input_length = strlen(input) - 1;
    if (input[input_length] != '\n') fail(too_big);
    input[input_length] = 0;

(feof(stdin))であるなら、(無効の_入力)に失敗してください。 入力_長さはstrlen(入力)と等しいです--1 '(入力[入力_長さ]!='\n')であるなら、失敗してください(_あまりに大きい)。 入力[入力_長さ]=0。

    for (p = input;  *p != 0;  ++p) {
      pp = strchr(print_ascii, *p);
      if (pp == 0) fail(invalid_input);
      *p = pp - print_ascii;
    }

(p=入力; *p!=0; + + p)のために(pp=0)が(無効の_入力)に失敗するなら、ppはstrchr(_ASCII、*pを印刷する)と等しいです; *pはppと等しいです--印刷_ASCII

    /* Decode: */

/*は解読します: */

    output_length = unicode_max_length;
    status = punycode_decode(input_length, input, &output_length,
                             output, case_flags);
    if (status == punycode_bad_input) fail(invalid_input);
    if (status == punycode_big_output) fail(too_big);
    if (status == punycode_overflow) fail(overflow);
    assert(status == punycode_success);

出力_長さはユニコード_最大_の長さと等しいです。 punycode状態=_は解読します(入力された入力_の長さと出力された出力_の長さは_旗をケースに入れます)。 (悪い_が入力したpunycode状態=_)が(無効の_入力)に失敗するなら。 (punycodeの_の大きい_状態=出力)であるなら、失敗してください(_あまりに大きい)。 (状態=punycode_オーバーフロー)であるなら、失敗してください(あふれてください)。 (状態=punycode_成功)について断言してください。

    /* Output the result: */

/*は結果を出力しました: */

    for (j = 0;  j < output_length;  ++j) {
      r = printf("%s+%04lX\n",
                 case_flags[j] ? "U" : "u",
                 (unsigned long) output[j] );
      if (r < 0) fail(io_error);
    }

(j=0; j<の出力_長さ; + + j)のためにr

    return EXIT_SUCCESS;
  }

EXIT_SUCCESSを返してください。 }

  usage(argv);
  return EXIT_SUCCESS;  /* not reached, but quiets compiler warning */
}

用法(argv)。 EXIT_SUCCESSを返してください。 /*は、達しませんが、コンパイラの警告の*/を落ち着けます。

Costello                    Standards Track                    [Page 33]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[33ページ]。

Author's Address

作者のアドレス

   Adam M. Costello
   University of California, Berkeley
   http://www.nicemice.net/amc/

アダムM.コステロカリフォルニア大学バークレイ校 http://www.nicemice.net/amc/

Costello                    Standards Track                    [Page 34]

RFC 3492                     IDNA Punycode                    March 2003

コステロStandardsは2003年のIDNA Punycode行進のときにRFC3492を追跡します[34ページ]。

Full Copyright Statement

完全な著作権宣言文

   Copyright (C) The Internet Society (2003).  All Rights Reserved.

Copyright(C)インターネット協会(2003)。 All rights reserved。

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

それに関するこのドキュメントと翻訳は、コピーして、それが批評するか、またはそうでなければわかる他のもの、および派生している作品に提供するか、または準備されているかもしれなくて、コピーされて、発行されて、全体か一部広げられた実現を助けるかもしれません、どんな種類の制限なしでも、上の版権情報とこのパラグラフがそのようなすべてのコピーと派生している作品の上に含まれていれば。 しかしながら、このドキュメント自体は何らかの方法で変更されないかもしれません、インターネット協会か他のインターネット組織の版権情報か参照を取り除くのなどように、それを英語以外の言語に翻訳するのが著作権のための手順がインターネットStandardsの過程で定義したどのケースに従わなければならないか、必要に応じてさもなければ、インターネット標準を開発する目的に必要であるのを除いて。

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.

上に承諾された限られた許容は、永久であり、インターネット協会、後継者または案配によって取り消されないでしょう。

   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS 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.

このドキュメントとそして、「そのままで」という基礎とインターネットの振興発展を目的とする組織に、インターネット・エンジニアリング・タスク・フォースが速達の、または、暗示しているすべての保証を放棄するかどうかというここにことであり、他を含んでいて、含まれて、情報の使用がここに侵害しないどんな保証も少しもまっすぐになるという情報か市場性か特定目的への適合性のどんな黙示的な保証。

Acknowledgement

承認

   Funding for the RFC Editor function is currently provided by the
   Internet Society.

RFC Editor機能のための基金は現在、インターネット協会によって提供されます。

Costello                    Standards Track                    [Page 35]

コステロ標準化過程[35ページ]

一覧

 RFC 1〜100  RFC 1401〜1500  RFC 2801〜2900  RFC 4201〜4300 
 RFC 101〜200  RFC 1501〜1600  RFC 2901〜3000  RFC 4301〜4400 
 RFC 201〜300  RFC 1601〜1700  RFC 3001〜3100  RFC 4401〜4500 
 RFC 301〜400  RFC 1701〜1800  RFC 3101〜3200  RFC 4501〜4600 
 RFC 401〜500  RFC 1801〜1900  RFC 3201〜3300  RFC 4601〜4700 
 RFC 501〜600  RFC 1901〜2000  RFC 3301〜3400  RFC 4701〜4800 
 RFC 601〜700  RFC 2001〜2100  RFC 3401〜3500  RFC 4801〜4900 
 RFC 701〜800  RFC 2101〜2200  RFC 3501〜3600  RFC 4901〜5000 
 RFC 801〜900  RFC 2201〜2300  RFC 3601〜3700  RFC 5001〜5100 
 RFC 901〜1000  RFC 2301〜2400  RFC 3701〜3800  RFC 5101〜5200 
 RFC 1001〜1100  RFC 2401〜2500  RFC 3801〜3900  RFC 5201〜5300 
 RFC 1101〜1200  RFC 2501〜2600  RFC 3901〜4000  RFC 5301〜5400 
 RFC 1201〜1300  RFC 2601〜2700  RFC 4001〜4100  RFC 5401〜5500 
 RFC 1301〜1400  RFC 2701〜2800  RFC 4101〜4200 

スポンサーリンク

SELECT データの抽出・問い合わせ・クエリー

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る