CreateUnicodeFile

File management function.

The CreateUnicodeFile function creates a file using Unicode encoding.

Usage

Used to force WinTask Write function to write in a new file using Unicode encoding.

Syntax

CreateUnicodeFile(<filename>)
or
ret=CreateUnicodeFile(<filename>)

Parameters

<filename>, string, name of the file to be created. If the file already exists, it is deleted and recreated. The Byte-Order Mark (BOM) is written at the beginning of the empty file, this byte is then detected by Write function for writing data in this new file using Unicode encoding.

Return value

Ret, numeric return code. When the file is created successfully, the function returns 0, otherwise use this return code for Error Handling.

Example

 

var = CreateUnicodeFile("\\Server\C\my directory\my file.txt")