When write-opening to a Unicode file, it is behoovy to then emit a byte-order mark before anything else:
print OUT "\x{feff}"; # Byte Order Mark
It even works happily with UTF8 files -- many applications correctly interpret as the resulting byte sequence as meaning "YES, THIS IS UTF8!".
Something fishy (Score:2)
Re:Something fishy (Score:1)
> perl -e "print map sprintf(q{%02x },$_), unpack q{C*}, qq{\x{feff}}"
ef bb bf
Re:Something fishy (Score:2)
Re:Something fishy (Score:1)
Re:Something fishy (Score:2)
"feff" (Score:2)
"You feffin' kids take your feffin' skateboards and your feffin' boomboxes somewhere else before I rip your feffin' heads open and take a feffin' coredump in the 0xdeadbeef inside!"
--Nat