On 30. Apr 2007, at 21:50, David Zhou wrote:
Is there a way to add a BOM marker to a UTF8 file created by Textmate?
Homesite on Windows doesn't seem to be reading files created by Textmate correctly as UTF8 -- I have a suspicion this may have something to do with the lack of a BOM marker in the beginning.
For the records, I talked with David on IRC and we created this command, which adds a BOM to the currently open file (which TM will then preserve):
Though this comes with the usual disclaimer about not using BOM’s in UTF-8, since it is bad for compatibility, e.g. the shell won’t understand the shebang line, merging multiple files using cat, grep, or similar, may cause BOM’s to end up in the middle of the file (and/ or not at the start of the result), etc.