From: Dossy Date: 2002-05-11T00:47:26+09:00 Subject: Re: Unicode in Ruby's Future? On 2002.05.11, Chris Gehlker wrote: > I was reading through "The Ruby Way" and noticed the sentence: "Because Ruby > isn't fully internationalized at the time of this writing, a character is > essentially the same as a byte." > > This implies that we may expect a character to be something other than a > byte in the near future. I started to search the archives but thought that > there are enough other newbies on this list that a summary of the plans > would be useful to many of us. I think a lot of M17N/I18N can be accomplished today in Ruby by subclassing String and creating a Transcoder class. In other words, define a UTF8String as a subclass of String and have its methods be UTF-8 aware. The Transcoder class would be responsible from converting from one encoding to another. Of course, I've got nearly zero working experience in this, so I'm purely speculating, but my point is that all of this should be doable without change to the Ruby core. I might start playing around and writing some tests and code if I find some time, but unless I can find paying projects, I can't really devote any serious time to this right now. > Would some knowledgeable person please post a synopsis of where Ruby > is going in this area. It would be very helpful if it contained hints > about how to write code that wont break during the transition. This would be very cool. A Ruby I18N FAQ? What does Google say ... I came up with this: http://www.inac.co.jp/~maki/ruby/ruby-i18n.html If you don't read Japanese, babelfish doesn't do a bad job translating: http://babelfish.altavista.com/tr?doit=done&lp=ja_en&tt=url&url=http://www.inac.co.jp/~maki/ruby/ruby-i18n.html -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)