"Robert Klemme" <bob.news / gmx.net> wrote in message news:<bbf1bd$8nl22$1 / ID-52924.news.dfncis.de>...

> 
> 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 :)

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?  There's
been a (proper, not \uXXXX) unicode regex module available for ruby
for a long time, I think.