From: Jean-Hugues ROBERT Date: 2002-05-11T03:27:15+09:00 Subject: Re: Unicode in Ruby's Future? Hello, At 03:10 11/05/2002 +0900, you wrote: >On 5/10/02 9:54 AM, "Yukihiro Matsumoto" wrote: > > > + string indexing is based on character, even for multi-byte > > characters. > > + regex routine understands multi-byte character strings. > > + user can define new character encoding scheme. > > + Ruby will shipped with support for ASCII, Latin-1, UTF-8, EUC-JP, > > SJIS, and probably more. > > + the goal of Ruby M17N is string manipulation without code > > conversion. > > + but there still be need for code conversion, but its spec is not > > fixed yet, probably it will use iconv. > > > > If you don't use multi-byte characters, there will be no > > incompatibility. If you do, string indexing for multi-byte character > > string is not recommended; use regex match instead. > >Thanks to Matz and everyone who responded. I really like where Ruby is >going. > >I infer from what is here that it's a poor idea for fake C structures like >stacks with strings. We should use arrays for that kind of thing. Hum... I was assuming that the current String would keep being byte based and that there would be some kind of WideString when user needs multi-byte characters. A more oo way would be to have AbstractString, ByteString and xxxString. Might be overkill. Yours, Jean-Hugues