manually adding BOM to UTF-16LE file?
i have a bash script that needs to preform something on a string from standard input, save it in a file and convert the file to UTF-16LE with BOM for further processing by another application.
i use iconv to convert the text file to UTF-16LE, but iconv actually creates a little-endian file WITHOUT the bom. (converting to UTF-16 creates a big endian file WITH bom)
i see no way of creating LE with BOM with iconv, so i thought maybe i could simply add the byte-order marks (FF FE) to the beginning of the unicode file. how can i do that?
many thanks in advance
tench
Mac Pro, Mac OS X (10.5.2)