Comment #28 on issue 459 by [email protected]: localeCompare implementation differs from other browsers
http://code.google.com/p/v8/issues/detail?id=459

Despite what I wrote in comment 15, we did take this to the ECMAScript standard group (ECMA TC39) and have made a significant progress.

See http://wiki.ecmascript.org/doku.php?id=strawman:i18n_api for the spec and http://code.google.com/p/v8-i18n/ for our implementation (that is a part of regular Chrome build).

It does not directly address the behavior of the existing localeCompare() with a single input param. Instead, it provides an enhanced API with a second parameter for 'locale' name. The same is true of toLocaleString (for objects like Date).

The implementation above does not yet implement localeCompare() with a locale parameter, yet. It can be implemented in multiple ways. Either changing V8 directly (with a dependency on v8-i18n) or v8-i18n can override localeCompare() without touching v8 proper.

Moreover, note that ECMAScript i18n module introduces intl.collator ( see http://wiki.ecmascript.org/doku.php?id=globalization:specification_drafts ) that offers more fine-grained support for collation. It's implemented in v8-i18n project and usable in chrome canary build.

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to