On 10/23/07, h3raLd <h3rald / gmail.com> 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/