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 -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/9fecdef8-dc29-421f-9870-45d0f0402f02%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
