webauthn icon indicating copy to clipboard operation
webauthn copied to clipboard

U+ notation incorrect

Open aphillips opened this issue 3 years ago • 0 comments

6.4.2. Language and Direction Encoding https://www.w3.org/TR/webauthn-2/#sctn-strings-langdir

So the string “حبیب الرحمان” could have two different DOMString values, depending on whether the language was encoded or not. (Since the direction is unambigous a directionality marker is not needed in this example.)

  • Unadorned string: U+FEA2, U+FE92, U+FBFF, U+FE91, U+20, U+FE8E, U+FEDF, U+FEAE, U+FEA4, U+FEE3, U+FE8E, U+FEE7
  • With language “ar-SA” encoded: U+FEA2, U+FE92, U+FBFF, U+FE91, U+20, U+FE8E, U+FEDF, U+FEAE, U+FEA4, U+FEE3, U+FE8E, U+FEE7, U+E0001, U+E0061, U+E0072, U+E002D, U+E0053, U+E0041, U+E007F

The Unicode notation and code points used in the example are incorrect. The Arabic string should not use compatibility (presentational) code points. All code points should be represented by a minimum of 4 hex digits.

The correct notation should be:

U+062D U+0628 U+06CC U+0628 U+0020 U+0627 U+0644 U+0631 U+062D U+0645 U+0627 U+0646

And for the example:

U+062D U+0628 U+06CC U+0628 U+0020 U+0627 U+0644 U+0631 U+062D U+0645 U+0627 U+0646 U+E0001 U+E0061, U+E0072 U+E002D U+E0053 U+E0041 U+E007F

aphillips avatar Jul 09 '21 17:07 aphillips