|
Re: ActiveSupport::Multibyte for better Unicode support: msg#00210lang.ruby.rails.core
On 9/26/06, Thijs van der Vossen <t.vandervossen@xxxxxxxxx> 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 rubyonrails-core@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: ActiveSupport::Multibyte for better Unicode support, Thijs van der Vossen |
|---|---|
| Next by Date: | Re: resource_feeder feedback, Sam Ruby |
| Previous by Thread: | Re: ActiveSupport::Multibyte for better Unicode support, Thijs van der Vossen |
| Next by Thread: | Re: ActiveSupport::Multibyte for better Unicode support, Thijs van der Vossen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |