On 26 Sep 2006, at 19:02 , Charles O Nutter wrote:
[...] Native JRuby support for MultiByte could potentially be significantly
faster than a pure Ruby version, but fully API-equivalent.

Finally a good reason to run Rails on Java! :-)

- We've been kicking around the possibility of migrating to a mutable
UTF-8 string inside JRuby, to avoid the wasted high byte and to get
all our mutability in a single type that's friendlier than what Java
provides. If we could say that the base JRuby String implementation
supports a fast, solid UTF-8 backing store normally and MultiByte's
String#chars and Chars for actual multibyte operations I think we'd
have the best of all worlds

Sounds like the way to go to me. UTF-8 is what Ruby has (although limited) built-in support for and for most Rails apps it's what you have to convert to in the end anyway.

Please not that ActiveSupport::Multibyte support all Unicode planes and not only the Basic Multilingual Plane. My knowledge of Java is very limited, but judging from the article at [1] working with anything beyond U+FFFF takes some serious effort.

Kind regards,
Thijs

[1] http://java.sun.com/developer/technicalArticles/Intl/Supplementary/

Attachment: PGP.sig
Description: This is a digitally signed message part

Reply via email to