From: 7stud -- Date: 2008-02-01T00:11:31+09:00 Subject: Re: Writing text files with an explicit encoding (UTF-16LE) 7stud -- wrote: > > require 'iconv' > > converter = Iconv.new("UTF-16", "ISO-8859-15") > utf_16_str = converter.iconv('hello world') > p utf_16_str > > --output:-- > "\376\377\000h\000e\000l\000l\000o\000 \000w\000o\000r\000l\000d" Whoops. I overlooked the 'LE' in your title: require 'iconv' converter = Iconv.new("UTF-16LE", "ISO-8859-15") utf_16_str = converter.iconv('hello world') p utf_16_str --output:-- "h\000e\000l\000l\000o\000 \000w\000o\000r\000l\000d\000" -- Posted via http://www.ruby-forum.com/.