From: Evan Martin Date: 2002-07-08T07:13:41+09:00 Subject: Re: is there a better string.each? On Mon, Jul 08, 2002 at 06:46:41AM +0900, Dossy wrote: > > String#split is multi-byte aware. > > > > $KCODE="EUC" > > a = "\xa1\xa1\xa1\xa2".split("") > > $KCODE="NONE" > > p a #=> ["\241\241", "\241\242"] > > > > Or > > a = "\xa1\xa1\xa1\xa2".split(//e) > > p a #=> ["\241\241", "\241\242"] > > Oh, hey, wow! Who snuck this in and where was it documented? :-) > > It works on 1.6.7 (2002-03-19), cool! Of course Ruby works with Japanese encodings... it's used by Japanese people, after all. :) The discussion here about multibyte encodings is mostly about Unicode, I think, which is not supported by Ruby. -- Evan Martin martine@cs.washington.edu http://neugierig.org