Hello,

I noticed some weird behavior when converting a string containing
international characters to YAML:

irb(main):002:0> 'test =F2=F9=E8'.to_yaml
=3D> "--- \"test \\x95\\x97\\x8A\"\n"
irb(main):003:0>

.=2E.but:

irb(main):001:0> 'test =F2=F9=E8'
=3D> "test \225\227\212"

Basically, the to_yaml method seems to use some strange hex escape
sequences which do not correspond to ANSI, UTF-8 or windows-1252...
The funny part is that when I load the same string from YAML, it is
displayed correctly in the console. This would be fine, except that
when I tried to save it to a file the international characters are not
displayed properly (or better, they are converted to the corresponding
ANSI/UTF-8 characters). What's going on here? What encoding does
to_yaml use to escape international characters?
According to the docs it should be UTF-8, but apparently it is not.

Ruby version: 1.8.6
OS: Windows XP

Any ideas?