Thread: NSIS 3.0b2
View Single Post
Old 26th October 2015, 00:03   #5
aerDNA
Senior Member
 
aerDNA's Avatar
 
Join Date: Feb 2007
Location: Rijeka, Croatia
Posts: 225
I don't know if this has been reported but I found an issue with FileReadUTF16LE. While testing a script, WordFind macro kept failing on the first string read from UTF-16LE file. First line only, even if all lines were identical. When displayed in Msgbox/DetailPrint, strings are also identical but StrLen of the first one is 1 byte larger. Writing the strings to Ansi with FileWrite results in 0x3F prepended to the first line. Since it only happens on the first line it must have to do with not discarding the first 2 bytes (FFFE) that designate utf-16le. My temporary fix is to skip them with FileSeek before using FileReadUTF16LE. Script to reproduce the problem is attached.
Attached Files
File Type: nsi Bug_FileReadUTF16LE.nsi (745 Bytes, 227 views)

PostEnd:
aerDNA is offline   Reply With Quote