SetExportFileEncoding

Determines if the Export file is created with UTF-8 or UTF-16 encoding.

Syntax

bool SetExportFileEncoding()

Parameters

Encoding: The encoding to use for the exported text file. The values can be "UTF8" or "UTF16".

Smart parameters are supported.

Returns

Always True.

Level

Any level

Details

Determines if the Export file is created with UTF-8 or UTF-16 encoding. If this action is not called, then the default value is UTF-8. If this action is called with an in valid parameter, then the format will default to UTF-8. For this action to take effect, it must be called prior to the first action that writes a value to the export file. It is recommended to call this action immediately before or immediately after setting the export file name and path.

Example
SetExportFileEncoding("UTF8")
SetExportFileName("Export_+@BATCHID+.txt")
SetExportDirectory("@APPPATH(export)")
ExportAllFields()

This example will create files in UTF-8 format.

SetExportFileEncoding("UTF16")
SetExportFileName("Export_+@BATCHID+.txt")
SetExportDirectory("@APPPATH(export)")
ExportAllFields()

This example will create the file in UTF-16 format.