From: Robert Klemme Date: 2005-02-01T00:10:53+09:00 Subject: Re: split string "Cai Li" schrieb im Newsbeitrag news:001101c5079f$4d6d7260$8caba2d3@lcai... > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > Btw, "str.split(/,/)" should do exactly the same and is more > efficient. > > It's no use :-( What do you mean by this? > > Err, what exactly is the problem? I don't see chinese characters, > which > > is probably doe to my installed encodings. But what result do you > want to > > get? > > > > My purpose is to make users read chinese chars clearly but not read > strings like > "\272\243\272\347\277\330\271\311" This is not a splitting issue but an output issue. Apparently you did something like "p array", i.e. used String#inspect. Try to do "puts array" - if your environment supports chinese chars then that should yield the expected output. Kind regards robert > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.1 (MingW32) - WinPT 0.7.96rc1 > > iD8DBQFB/j1pVLC4xCNBi2kRAgadAJ9z+UEcGTKJlAE7aFD9W/ZcfqtrlQCfZhZk > x6+D3iXlWUtQq1n/LhXAAuo= > =s+Of > -----END PGP SIGNATURE----- > >