On 9/26/06, Thijs van der Vossen <[EMAIL PROTECTED]> wrote:
> On 26 Sep 2006, at 17:09 , Charles O Nutter wrote:
> > [...] we're probably just going to create some incompatibilities to
> > solve the Unicode issue on our end. It's likely that in the future
> > all strings in JRuby will be UTF-16 strings as in Java, and all
> > operations will deal in characters instead of bytes whereever
> > possible. We'll deal with issues that arise as they come up, such
> > as for handling IO that wants byte counts when we're providing
> > character counts.
>
> Early versions of the unicode_hacks plugin redefined string methods
> to work on codepoints instead of bytes. This turned out to break a
> lot of libraries and applications in sometimes subtle but very nasty
> ways. Patching up IO might work, but suppose you have something like
> this:
>
>    header('Content-Length', body.length)
>
> Here, length must return the number of bytes and not the number of
> characters. How can you ever know what to return in this case?

It's for exactly this reason I advocated a separate char sequence type
in future Ruby versions, and why I like AS::MB's approach to the
problem best so far.

>
> Kind regards,
> Thijs
>
>
>
>
>


-- 
Contribute to RubySpec! @ www.headius.com/rubyspec
Charles Oliver Nutter @ headius.blogspot.com
Ruby User @ ruby.mn

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core
-~----------~----~----~----~------~----~------~--~---

Reply via email to