FileGetW

Converts a file to a Unicode string variable.

Syntax:

FileGetW(filename [, null-char])

Parameters:

(s) filename name of the file to read.

(s) null-char [optional] specifies the character which NULL characters in the file will be replaced with in the string. If omitted or a blank string (""), then NULL characters will be removed.

Returns:

(s) a Unicode string containing the file contents.

 

This function is like FileGet, except that the return value is a Unicode string, and "null-char" specifies a Unicode character.

This function supports extended-length path names.

Example:


filename = "c:\temp\Unicode.txt"
data = FileGetW(filename , "")
bytecount = StrByteCount(data)
bb = BinaryAlloc(bytecount)
BinaryPokeStr(bb,0,data)
Message("Unicode data is in the binary buffer.")
BinaryFree(bb)
Exit
See Also:

IntControl 39, FileGet, FilePutW