-
Notifications
You must be signed in to change notification settings - Fork 30.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
string.normalize() doesn't seem to work #1712
Comments
Right, You can build yourself and bundle it with the instructions in the readme. |
Thanks! Perhaps this function should throw an error if Intl was not compiled in? By silently failing, some people will run this function thinking it works and therefore introducing bugs into their software. |
I think that's probably a good idea. It's on v8's side though. Cc @domenic? |
V8 doesn't really support builds without Intl, so I doubt they are going to bother to change how this works. |
If building without Intl means having an incorrect conformance to ES6, then perhaps Intl should be built in by default? |
Yes, I think it should. There are other threads on it. People are scared about making the binary bigger I guess. |
Example other thread: #238 |
I was eager to replace my dependency on unorm, which does the equivalent of ES6's unicode .normalize(), but as best I can tell, .normalize() doesn't work. It returns the same string, unchanged, un-normalized. I have run tests with a list of Japanese words. I am using io.js 2.0.1. The following example script should pass, but it fails (be sure to "npm install unorm" before running it):
The same script fails if normalization NFD is used instead of NFKD. It passes for NFC and NFKC, but that may be because these strings simply aren't supposed to be changed for those normalizations. The output of the above script is:
*edit, corrected variable names
The text was updated successfully, but these errors were encountered: