javascriptunicodenormalizationunicode-normalizationtext-normalization

Text normalization in JS


Is there any way to convert a string to normal form C in Javascript? I know about unorm in node.js, but I'm interested in in-browser JS, so reasonably standard browser APIs are ok.


Solution

  • Since this question was asked, String.prototype.normalize(form) was added to the language.

    Now, the below does what I wanted:

    myString.normalize('NFC')