From: Richard Conroy Date: 2007-06-01T18:50:49+09:00 Subject: Re: Unicode roadmap? On 5/31/07, Ivan Mashchenko wrote: > Finally, is there a convenient support for Unicode in Ruby? Or, if not, > when will it be? It depends on your definition of 'convenient'. The short answer is that unicode applications can be made in Ruby, particularly Web Apps. It is not especially difficult, but it is not 'for free' or seamless. You generally have to use an encoding-aware string type, or modify the existing string class to support multi-byte characters. A longer answer would contain references to the fact that there are multiple options here, that web apps (Rails in particular) are ahead of pure Ruby in terms of Unicode, and that there are actually a lot of projects to investigate. The hardest part of Ruby and Unicode is that not all of the libraries support it, or that some of the meta-hackery to the string class could break libraries that expect chars.length to equal bytes.length (there are other examples). Some of the more popular libraries are like this, or they inherit the encoding from your O/S settings and cannot be driven from an API. > I am going to develop an international website (with pages in some > european languages, including those using non-latin alphabets). I think > it should prove to be a good idea to make such a website totally in > Unicode (probably UTF-16), without using any legacy encodings at all. Well yes, but I would use UTF-8 instead. Its Unicode designed for the web (and UTF-16 is a bit wierd in some ways - there are at least 3 kinds of UTF-16 that I am aware of). Rails 1.2 introduced some pretty impressive support for Unicode in the last release, all of the major i18n plugins should be compatible with these changes by now. > As well I would like to ask when the next Ruby release is planned to. If > it comes this year, I should probably try nightly builds as it seems to > be wise to start a new project targeting ea version of the next release. AFAIK there is no release schedule. YARV is basically Ruby 1.9, and it is scheduled for release around the end of the year. However there is no firm commitment to make it the next Ruby version. Also Ruby 1.9 is going to break/deprecate stuff - I wouldn't develop against it, it will be a rough experience. Ruby 1.9 is kind of a staging release; migrating from 1.8 -> 1.9 is going to be tricky, but 1.9 -> 2.0 should be a drop in; that the intention - isolate the biggest changes to the 1.9 release. If you are moving to Ruby 1.9, do it with a complete working application. Or better still, develop against Rails versions, not Ruby versions. Let the Rails team figure out the best Ruby migration strategy for you.