The File Interface in Unicode Programs

Since the content of files frequently reflects the structure of data in the working memory, the file interface in a Unicode system must fulfill the following requirements:

For this reason, in Unicode programs, you must always define the code page used to encode the character-type data that is written in text files or that is read from text files.

You must also consider that a Unicode program must be executable in a non-Unicode system as well as a Unicode system. Some of the syntax syntax rules for the file interface have therefore been modified so that programming data access in Unicode programs is less prone to errors than in non-Unicode programs.

When opening a file in TEXT MODE, the ENCODING addition must be used to specify the character representation. When opening a file in LEGACY MODE, the byte order (endian) and a non-Unicode code page must be specified.
In non-Unicode programs, if nothing is entered, a file is opened with implicit standard settings.

Note

In Unicode programs, file names can also contain blank characters.