FileReadUTF16LE skips optional BOM and FileWriteUTF16LE can write a BOM with the /BOM switch

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6626 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2015-10-26 23:29:39 +00:00
parent 37c81f74f8
commit b54c831ff0
7 changed files with 59 additions and 13 deletions

View file

@ -44,7 +44,7 @@ DBCS text is supported but conversion output is limited to UCS-2/BMP, surrogate
\NsisFuncReqU
Reads a string (UTF-16LE characters) from a file opened with \R{FileOpen}{FileOpen}. The string is read until either a newline (or carriage return newline pair) occurs, or until a null wide-character is read, or until maxlen is met (if specified). By default, strings are limited to 1024 characters (a special build with larger NSIS_MAX_STRLEN can be compiled or downloaded). If the end of file is read and no more data is available, the output string will be empty, and the error flag will be set.
Reads a string (UTF-16LE characters) from a file opened with \R{FileOpen}{FileOpen}. The string is read until either a newline (or carriage return newline pair) occurs, or until a null wide-character is read, or until maxlen is met (if specified). By default, strings are limited to 1024 characters (a special build with larger NSIS_MAX_STRLEN can be compiled or downloaded). If the end of file is read and no more data is available, the output string will be empty, and the error flag will be set. If present, the BOM at the start of the file is skipped.
\c ClearErrors
\c FileOpen $0 $INSTDIR\file.dat r
@ -118,11 +118,11 @@ Writes an ANSI string to a file opened with \R{FileOpen}{FileOpen}. If an error
\S2{FileWriteUTF16LE} FileWriteUTF16LE
\c handle string
\c [/BOM] handle string
\NsisFuncReqU
Writes a Unicode (UTF-16LE) string to a file opened with \R{FileOpen}{FileOpen}. If an error occurs writing, the error flag will be set.
Writes a Unicode (UTF-16LE) string to a file opened with \R{FileOpen}{FileOpen}. If an error occurs, the error flag will be set. A BOM can be added to empty files with /BOM.
\c ClearErrors
\c FileOpen $0 $INSTDIR\file.dat w

View file

@ -10,10 +10,14 @@ Released on ? ?th, 201?
\b RequestExecutionLevel now defaults to \c{admin}
\b FileReadUTF16LE now skips the optional BOM at the start of a file
\S2{} Minor Changes
\b Fixed System plugin GUID type output bug on Win98
\b FileWriteUTF16LE can add a BOM with the /BOM switch
\b !system and !execute now provide a empty StdIn pipe to work around bugs in some Windows utilities
\b MakeNSISW now uses WinInet when checking for updates