Unicode for Rails

I finally gave my talk this afternoon. I rushed through things in 40 minutes; I was planning on 45, but I started a little late due to microphone difficulties.

The talk seemed to go down well; a few people came up to ask questions afterwards. My official hecklers, Tom and Paul were noticeably silent. They didn’t try to pedant-me-to-death afterwards, which is good. Although it probably means I had too much detail in there for mere mortals!

I’d also like to give a huge bouqet of thanks to the hyper-lovely _why for his fabulously encouraging words along the way.

Anyway, please take a look at the slides for Unicode for Rails if you fancy. One thing I added at the last minute and didn’t get a chance to show on screen was the links slide. In particular, I recommend checking out Julik’s Unicode Slides.

I practised by giving the talk to a collection of fluffy toys that we have around the house. We now have the most well-unicode-educated giraffes in existence, I suspect. πŸ™‚

On a slightly less fun note, I’ve just read Tony Finch’s summary of UTF-8 in email, which is far, far hairier than in HTTP (which has most of the complications built in at least). Worth checking out if you do much email.

7 Comments to Unicode for Rails

  1. We’re still working on some minor things like improving the documentation and a script that you can use to turn the ActiveSupport::Multibyte plugin into a patch automagically.

    It’s getting more and more official as the week progresses. Please do check the plugin out and let us know what you think about it.

  2. Thijs: many thanks for the link. I actually spotted the activity on fngtps.com a couple of days ago, but I didn’t really know how “official” it was so decided not to mention it.

    Anyway, that looks really cool. I’ll try and check it out when I get a moment…

  3. We’re almost ready with a new version of Julik’s ‘Unicode Hacks’ that’s now called ‘ActiveSupport::Multibyte’. You can find more information and code on the ‘Multibyte for Rails’ project site.

  4. Hugh: Personally, I’d really try to make everything use UTF-8. It’s probably a simpler choice for the long term. You can probably make it work just fine with ISO-2022-JP, but UTF-8 will be better supported as time goes on. If you’re using a database, I would imagine that UTF-8 support is probably better there, too.

    To be honest, I don’t know for certain because I don’t have enough experience. I just happen to believe that UTF-8 is a pretty safe bet. πŸ™‚

  5. Hamza: Many thanks for the kind words. The Rails wiki page is a good place to start.

    As to the slight issues in Safari, it seems to work OK when I had a quick look at it. πŸ™‚ But really, that’s just life on the Internet. The best thing you can do is try to replicate it the problem and then insert a test so it doesn’t happen again.

  6. Hugh says:

    Thanks for posting your slides, very informative. One question though, if I’m making a rails app in just Japanese & English should I try and use UT8-F or will ISO-2022-JP work?

  7. Hamza says:


    I would just like to say that I enjoyed your talk.

    I did not have time to come up to you after the talk, but I just wanted to let you know that I have developed a UTF-8 site in Rails.

    It is a Bilingual Chinese / English website named


    Nothing much that I did apart from follow the utf-8 wiki and not do any string manipulation πŸ™‚

    I think there could be an issue in Safari, but I have not had time to look into it.

    Kind Regards