2. Text file encoding

encoding -> 'encoding' charset_string ';'

The encoding of the text file containing a XED script may be specified using an encoding declaration found at the very beginning of the file. Examples (note that the charset names are case-insensitive):

encoding 'UTF-8';

encoding 'iso-8859-1';

If such encoding declaration is missing, the encoding is automatically determined using the byte order marks (BOM) found at the beginning of the text file. If the encoding cannot be determined this way, then it is assumed to be the encoding used by the operating system (e.g. "Windows‑1252" on a computer running Windows with a western locale).