JRuby: Unicode out-of-box

Posted by yrashk on March 06, 2007

I’ve started playing with JRuby 0.9.8. I personally think that it has great potential for web development in Rails (they have 98% of rails tests passing already !).

What I was pleased to see is that (thanks to Java) unicode is working in JRuby just fine without any workarounds like String#chars :

That’s very, very good! Continuing to explore JRuby possibilities.

Comments
  1. Anders MelanderMarch 26, 2007 @ 06:22 PM

    Hmmm. How do you use String#upcase with Russian or Francais in standard Ruby?

  2. Oleg AndreevMarch 27, 2007 @ 02:50 PM

    2 YR: What about ‘arbitrary sequence of bytes’ concept for String? What if I do File.new(‘binary’).read[0..2]?

    2 Anders: via string.chars proxy. See http://api.rubyonrails.org/classes/ActiveSupport/CoreExtensions/String/Unicode.html#M000417