From: Chris Morris Date: 2009-04-10T05:31:22+09:00 Subject: Output UTF-16LE BOM to file - 1.9 --0016e642d8c07b6ff9046725214f Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32] With this code: File.open('zz.txt', 'w:UTF-16LE') do |f| f.print "Hello Uni-world" end ...I get no BOM guts = File.read('zz.txt') puts guts.bytes.to_a.inspect #=> [72, 0, 101, 0, 108, 0, 108, 0, 111, 0, 32, 0,... ...and my brain can't concoct a way to insert it myself, though I know it must be simple... -- Chris http://clabs.org --0016e642d8c07b6ff9046725214f--