> install the ya2yaml gem and use "=F4=DA=D9=B5=DE=D9=DB=C0=D3=EC007=A3=BA=
=E4=DE=E5=A8=F1=FD=FB=FD".ya2yaml instead of .to_yaml

I really hoped this worked but it didn't for 100%.

Here is what I did:
I installed ya2yaml gem using "gem install ya2yaml" command (Windows
box) and "sudo gem install ya2yaml" Linux box. Got: ya2yaml-0.26.

Then I modified my simple program to be:
#!/usr/bin/env ruby

require 'yaml'
require 'ya2yaml'
require 'jcode'
$KCODE =3D 'u'

# show "James Bond 007: Nightfire" text
# in Chinese in YAML form
puts '=F4=DA=D9=B5=DE=D9=DB=C0=D3=EC007=A3=BA=E4=DE=E5=A8=F1=FD=FB=FD'.ya2ya=
ml

and ran it both on my Windows and Linux boxes.

Windows: When I redirect results to a file (running "yaml_test.rb >
test.yaml") it works perfectly but when I try to display results on a
screen (running "yaml_test.rb") with 65001 active code page (set
through "chcp 65001" in command line) I see:
(squares)007(squares) and an error message: "in 'write' Bad file
descriptor (Errno::EBADF)".

Linux: While running above program I get:
"./yaml_test.rb:4:in `require': no such file to load -- ya2yaml
(LoadError) from ./yaml_test.rb:4"

Any clue how to work around this?
Any help much appreciated!

--
Pawe=A9=A9 Radecki
e: pawel.j.radecki / gmail.com
w: http://radeckimarch.blogspot.com/