Thread: NSIS 3.0b2
View Single Post
Old 26th October 2015, 11:04   #7
Senior Member
aerDNA's Avatar
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
I mentioned StrLen because it was an indicator of where the problem lies. I definitely agree BOM should be given special treatment because FileRead is primarily intended for dealing with human text, that's why it reads until newline. When you use it to read from a .txt you're supposed to get a string that can be safely processed as plain text (+newline). Like I said, BOM currently breaks the much-used WordFind macro, probably others too. This can cause massive cockups in scripts relying on FileReadUTF16LE, especially since it is not documented.

Also, maybe you should consider modifying FileWriteUTF16LE so that it inserts a BOM if offset=0. Presently you can add lines to an existing file but you can't create a new standard-compliant file using solely FileWriteUTF16LE.

aerDNA is offline   Reply With Quote