C
Chris Morris
[Note: parts of this message were removed to make it a legal post.]
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...
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...