From: Robert Klemme Date: 2003-06-04T17:35:52+09:00 Subject: Re: ruby unicode./encoding support "Benjamin Peterson" schrieb im Newsbeitrag news:986d2608.0306030832.7e9dab83@posting.google.com... > "Robert Klemme" wrote in message news:... > > > > > Personally I think Java has one of the best approaches taken here: all > > strings consist of unicode characters and streams have an encoding > > attached that is applied during reading and writing. Maybe this is not > > the ideal solution for ruby. Maybe one should add a class UnicodeString > > that supports encodings and conversions. What do others think? > > > > I think you're right. There was a time about 2 years ago when this > problem was quite widely discussed in the ruby community, but I think > everyone's resigned themselves to the status quo now :) *sigh* Thanks for replying anyway. > A unicodestring class would be nice (actually, I could have sworn > there was one already) but would there be any way to make it > seamlessly replace the existing string, so that string literals, > regexes, and File.readline etc would all do the right thing? Hm, of course there would be some work in the interpreter, in IO and subclasses, in Regexp and of course in String. But using a default encoding it could be possible to leave most existing applications untouched, I guess. But, it *is* a major effort. > There's > been a (proper, not \uXXXX) unicode regex module available for ruby > for a long time, I think. Thanks! Regards robert