Posts Tagged ‘utf8’

JavaScript Collation Fail

Monday, July 14th, 2008

In JavaScript, the localeCompare method on Strings seems like a great way to properly sort strings, but its not:
localeCompare Javasript method in 4 browsers
Hint: The last line should all look the same. At least I expect Firefox and Opera to agree. You can’t expect much from IE6.

For kicks try out other browsers and post the final sorted list in the comments (hopefully my blog supports unicode).