f$FileEncoding (f$DateiEncoding)
f$FileEncoding (f$DateiEncoding)
Set the mode with which the following text files are opened.
In doing this you can specify if the files can contain Unicode text or not. The format in which text files are processed should be planned based on the type of text being saved (only English, German, Polish, Cyrillic or Chinese) and the processes that are to be worked on further.
With UTF-8 coding, a specially coded byte string of variable length is assigned to every Unicode character. UTF-8 supports up to four bytes, upon which all Unicode characters can be represented, like with all UTF formats.
UTF-16 is the oldest coding process. It uses one or two 16-bit units (2 or 4 bytes) for coding a character.
Syntax: | Status = f$FileEncoding ( Mode ) | ||
| Argument | Type | Meaning |
| Mode | Integer | Mode to be set 0 – files are opened in ASCII format 1 - files are opened in UTF-8 format 2 - files are opened in UTF-16 format |
Result: | Integer | 0: the mode was set successfully. -1: modes 1 and 2 are only supported in the Unicode version of ePOS. The mode was set to 0. | |
Status = f$FileEncoding ( 1 )