setFileEncoding

setFileEncoding(kind: Integer; unicodeBom: Boolean) updating;

The setFileEncoding method of the JadeXMLDocument class sets the file kind and Unicode Byte Order Mark (BOM) to be used when the writeToFile method is called. If the setFileEncoding method is not called, the encoding of the file is native ANSI or Unicode.

If you specify the File class kind property Kind_Unicode_UTF8 constant value for the kind parameter, the following XML header declaration is used if one is output.

<?xml version="1.0" encoding="UTF-8"?>

The setFileEncoding method parameters are listed in the following table.

Parameter Description

kind

Contains the kind of file that is to be opened, represented by one of the File class kind property constant values.

If the specified value is zero (0), the encoding of the file is native ANSI or Unicode.

unicodeBom

Specifies whether a Unicode BOM is present in the file, represented by the File class unicodeBOM property.

2022.0.01 and higher