Attila Szegedi wrote: > > On 2008.02.29., at 21:13, Charles Oliver Nutter wrote: > >> It does, but that's not really any better. We don't have char, we have >> byte. The overhead of decoding our bytes to chars and back all the >> time >> was huge. So we needed a fast byte[]-based engine. > > This always intrigued me -- does this mean Ruby only works with single- > byte character encodings? Or maybe even with just a single fixed > character encoding?
In Ruby 1.8, the encoding can be ascii or utf-8...and JRuby generally defaults to UTF-8 behavior, since we have to interact with the rest of Java. In Ruby 1.9, strings are still byte[], but they're encoding-agnostic. You specify the encoding you want on global, per-script, or per-string scale. Any string can be reinterpreted as any encoding (or no encoding) at any time, because they're still all just byte[] under the covers. - Charlie --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "JVM Languages" 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/jvm-languages?hl=en -~----------~----~----~----~------~----~------~--~---
