Subject: How to save string to a file as UTF-8
From: Bali Bali <bill.z.li gmail.com>
Date: Thu, 30 Jul 2009 11:29:09 +0900
Below code:
--
s1 = "good"
File.new("test.xml", "w+") << s1
--
It always give a file ANSI encoded. How can I get it UTF-8 encoded?
Thanks.
--
Posted via http://www.ruby-forum.com/.