From: Luis Parravicini Date: 2007-10-23T22:05:45+09:00 Subject: Re: to_yaml and international characters On 10/23/07, h3raLd wrote: > I noticed some weird behavior when converting a string containing > international characters to YAML: > > irb(main):002:0> 'test עשט'.to_yaml > => "--- \"test \\x95\\x97\\x8A\"\n" > irb(main):003:0> > > ...but: > > irb(main):001:0> 'test עשט' > => "test \225\227\212" \225\227\212 is the same as \x95\x97\x8A, the former in octal, and the latter in hex. irb(main):002:0> 0x95.to_s(8) => "225" irb(main):003:0> 0x97.to_s(8) => "227" irb(main):004:0> 0x8a.to_s(8) => "212" Bye -- Luis Parravicini http://ktulu.com.ar/blog/