Hi,
Sorting of an array of strings in javascript can typically be done by passing a function to Array.prototype.sort for comparing two values. And if you want to sort strings in a language needing a Unicode collation you are supposed to use String.prototype.localeCompare. localeCompare allows for passing in the locale you want to sort in: str.localeCompare(compareString [, locales [, options]])
Right now node.js does not support passing in locales. I think it have to do with node.js/V8 not having implemented the intl.Collator object. Does anyone know why this is not supported and when it hopefully will be suported in the node.js binary (without having to do a custom build)? I am not able to find any clear information on this. In most major programming languages unicode collations are supported. I think it is a must that javascript/node.js should be able to sort strings in non-english languages correctly.
Regards, Per Halvor