6.1. ユーザーコードの推奨事項 (User Code Recommendations)
🇬🇧 English
For many users, their nearest Internet-connected device will be their mobile phone; typically, these devices offer input methods that are more time-consuming than a computer keyboard to change the case or input numbers. To improve usability (improving entry speed and reducing retries), the limitations of such devices should be taken into account when selecting the user code character set.
One way to improve input speed is to restrict the character set to case-insensitive A-Z characters, with no digits. These characters can typically be entered on a mobile keyboard without using modifier keys. Further removing vowels to avoid randomly creating words results in the base 20 character set BCDFGHJKLMNPQRSTVWXZ. Dashes or other punctuation may be included for readability.
An example user code following this guideline, WDJB-MJHT, contains 8 significant characters and has dashes added for end-user readability. The resulting entropy is 20^8.
Pure numeric codes are also a good choice for usability, especially for clients targeting locales where A-Z character keyboards are not used, though the length of such a code needs to be longer to maintain high entropy.
An example numeric user code that contains 9 significant digits and dashes added for end-user readability with an entropy of 10^9 is 019-450-730.
When processing the inputted user code, the server should strip dashes and other punctuation that it added for readability (making the inclusion of such punctuation by the user optional). For codes using only characters in the A-Z range, as with the base 20 charset defined above, the user's input should be uppercased before a comparison to account for the fact that the user may input the equivalent lowercase characters. Further stripping of all characters outside the chosen character set is recommended to reduce instances where an errantly typed character (like a space character) invalidates otherwise valid input.
It is RECOMMENDED to avoid character sets that contain two or more characters that can easily be confused with each other, like "0" and "O" or "1", "l" and "I". Furthermore, to the extent practical, when a character set contains a character that may be confused with characters outside the character set, a character outside the set MAY be substituted with the one in the character set with which it is commonly confused; for example, "O" may be substituted for "0" when using the numerical 0-9 character set.
🇯🇵 日本語
多くのユーザーにとって、最も近いインターネット接続デバイスは携帯電話です。通常、これらのデバイスは、大文字小文字を変更したり数字を入力したりするために、コンピュータキーボードよりも時間のかかる入力方法を提供します。ユーザビリティを向上させる(入力速度を向上させ、再試行を減らす)ために、ユーザーコード文字セットを選択する際には、このようなデバイスの制限を考慮する必要があります。
入力速度を向上させる一つの方法は、文字セットを大文字小文字を区別しない A-Z 文字に制限し、数字を含めないことです。これらの文字は通常、修飾キーを使用せずにモバイルキーボードで入力できます。さらに、ランダムに単語を作成することを避けるために母音を削除すると、base 20 文字セット BCDFGHJKLMNPQRSTVWXZ が得られます。ダッシュまたはその他の句読点を可読性のために含めることができます。
このガイドラインに従った例のユーザーコード WDJB-MJHT は、8 つの有効文字を含み、エンドユーザーの可読性のためにダッシュが追加されています。結果のエントロピーは 20^8 です。
純粋な数値コードも、特に A-Z 文字キーボードが使用されないロケールを対象とするクライアントにとってユーザビリティの良い選択ですが、高いエントロピーを維持するには、そのようなコードの長さをより長くする必要があります。
9 桁の有効数字を含み、エンドユーザーの可読性のためにダッシュが追加され、10^9 のエントロピーを持つ例の数値ユーザーコードは 019-450-730 です。
入力されたユーザーコードを処理する際、サーバーは可読性のために追加したダッシュやその他の句読点を削除する必要があります(ユーザーによるそのような句読点の含めることをオプションにします)。上記で定義された base 20 文字セットのように、A-Z 範囲の文字のみを使用するコードの場合、ユーザーが同等の小文字を入力する可能性があるという事実を考慮して、比較の前にユーザーの入力を大文字にする必要があります。誤って入力された文字(スペース文字など)が他の有効な入力を無効にするケースを減らすために、選択された文字セット外のすべての文字をさらに削除することが推奨されます。
"0" と "O"、または "1"、"l"、"I" のように、互いに簡単に混同できる 2 つ以上の文字を含む文字セットを避けることが推奨されます (RECOMMENDED)。さらに、実用的な範囲で、文字セットに文字セット外の文字と混同される可能性のある文字が含まれている場合、セット外の文字をセット内の通常混同される文字で置き換えることができます (MAY)。たとえば、数値 0-9 文字セットを使用する場合、"O" を "0" で置き換えることができます。