Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
avoid locale-dependent string comparisons
It doesn't seem appropriate to use locale dependent ordering to sort the variants and extensions for normalization. The result of normalization should be consistent. The Unicode CLDR specficiation is not specific about how these tags are sorted, it just says that they should be in "alphabetical order". They only contain a-z (lower case) and 0-9, so for most locales alphabetical order is the same as the code point order we are now using. This commit removes a dependency on the ECMAScript internationalization API. This API is not available everywhere, particularly on embedded devices like TVs where storage space for internationalization data is limited. This is important as bcp-47-normalize is now used by dash.js which in turn is used by many HbbTV applications.
- Loading branch information