From: Phillip Gawlowski Date: 2008-04-08T07:56:09+09:00 Subject: Re: Saving UTF-8 characters to YAML problem -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paweł Radecki wrote: | Hi there, | | I'm trying to save multinational data to YAML with following simple | program: | | require 'yaml' | | # show "James Bond 007: Nightfire in Chinese" | # text in YAML form | puts '詹姆斯邦德007:暗夜之火'.to_yaml | | and what I get is: | --- "\xE8\xA9\xB9\xE5\xA7\x86\xE6\x96\xAF\xE9\x82\xA6\xE5\xBE | \xB7007\xEF\xBC\x9A\xE6\x9A\x97\xE5\xA4\x9C\xE4\xB9\x8B\xE7\x81\xAB" | | How can I make this to be human readable text? With an editor that understand UTF-8, I guess (considering that you use characters I know from Polish, you probably already do). The OS has to support UTF-8, too (I *think* that Windows does, and so should Mac OS X. I'm not sure about other *NIX flavors). If you mean Ruby, Iconv and Kconv are the way to go, AFAIK, to convert strings between character sets. - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan Rule of Open-Source Programming #8: Open-Source is not a panacea. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf6pooACgkQbtAgaoJTgL/CCQCgo5vT8Jl0mynvcKRJn/36jNuc XkkAn0RLEwKcyMv/A7BN6i0krgx++td7 =Umd0 -----END PGP SIGNATURE-----