Please sign in to comment.
Add a BOM on open for utf16 filehandles
When we open a file for write we will write a BOM upon open. Since we already truncate the file if it exists, this shouldn't cause any loss of data aside from the previous functionality. If we are appending, then only add a BOM if there is nothing yet written to the file. If the file already has data in it, then don't add a byte order mark.
- Loading branch information...