Japanese/American Centricism on Rails
June 20th, 2006Becky has asked me something about currency in Ruby/Rails/ActiveRecord. I don’t know much about Rails/Ruby/ActiveRecord, but I was surpised to learn that Ruby programmers have no sense for collation. I was trying to explain to Becky that There Is More Than One Way To Do It, but I was wrong.
After showing here that she could sort by adding an :order => 'name' to the ActiveRecord::find method, I found that Ruby’s Array::sort had no way to do a proper collation. Thus, the only way that you could get your ‘a’ before your ‘B’ consistantly in Ruby would be to trust the underlying SQL engine. (Be warned, if you tell me to downcase or upcase you will be flamed.)
Squirt around the Internet looking for answers you’ll find none. Then to be malicious, I ran the search for ruby collation with a minor tweak that produced tons of intelligent responses. In Ruby land, collation is no.
Strange that this language from Japan has little support for i18n and l10n. What gives? Ruby obvously has support for Kanji, but none for Unicode. Is it not that important?
comments

