archives

« Bugzilla Issues Index

#1272 — Incorrect algorithm steps in String.prototype.normalize


The new String.prototype.normalize function includes an incomplete algorithm step:

4. If form is not provided or undefined.

The strawman had "If form is undefined or not provided, let form be 'NFC'." It seems the entire step has become unnecessary because the function parameter list now provides a default value for form.

The function also has a step that lists "NFC" twice and omits "NFKD" from its condition, and then has two "then" parts for one "if":

7. If f is not one of "NFC", "NFD", "NFKC", or "NFC", then let form be "NFKD", then throw a RangeError Exception.

The statement should be

7. If f is not one of "NFC", "NFD", "NFKC", or "NFKD", then throw a RangeError Exception.

Finally, step 8 contains "by in". Either one of these words fits, but both together are too much.


fixed in rev 15 editor's draft


resolved in rev 15, May 14, 2013 draft


Verified in rev 26 draft.