Matz,

thanks for taking part in that discussion. I would really appreciate an elegant unicode solution from the master himself :-) in ruby (and probably all other non-us citizens)

In most cases I would be happy if at least this functions 
of class String had an unicode equivalent.

 capitalize
 upcase
 downcase
 reverse
 slice
 split
 index

Maybe it's because I am no guru of regexp but I can't imagine a trivial solution.

Another issue is that ActiveRecord (and other additional libraries) 
are not unicode aware because there is no _transparent_ unicode support. 

Just as an example,

functions like:

 ActiveRecord::Validations::ClassMethods::validates_length_of
 
using parameters like 

 # minimum - The minimum size of the attribute
 # maximum - The maximum size of the attribute 

will most probably use String.size which is giving the byte length,
not the string length.

The ruby 2.0 solution I read about (each string carries it's encoding inside) sounds fantastic (not to mention bytecode execution). Could you imagine an implementation of that before ruby 2.0 ?

Best regards
Peter


-------- Original-Nachricht --------
Datum: Wed, 14 Jun 2006 17:38:40 +0900
Von: Dmitry Severin <dmitry.severin / gmail.com>
An: ruby-talk / ruby-lang.org
Betreff: Re: Unicode roadmap?

> On 6/14/06, Victor Shepelev <vshepelev / imho.com.ua> wrote:
> >
> > Hmmm.. I've think Unicode IS defaul String encoding when $KCODE=u
> > Not?
> 
> 
> 
> No. Current String implementation has no notion of "encoding" (Ruby String
> is just a sequence of bytes) and $KCODE is just a hint for methods to
> change
> their behaviour (e.g. in Regexp) and treat those bytes as text represented
> in some encoding.