ENCODING= specifier

Standard: F77 F90 F95 F2003 F2008 F2018


<Syntax>

This specifier is permitted in the INQUIRE and OPEN statements only.

In the OPEN statement the syntax is
      ENCODING = expression
The expression must be a scalar character expression of default kind.

In the INQUIRE statement the syntax is
      ENCODING = variable
The variable must be a scalar character variable of default kind.

<Semantics>

In the OPEN statement the ENCODING= specifier determines the encoding method of the file. Since Release 6.0 the NAG Fortran Compiler has supported 'ASCII', 'DEFAULT', 'SHIFT_JIS' and 'UTF-8'.

In the INQUIRE statement this specifier assigns the encoding method of an open file (usually 'DEFAULT') to a variable. For an unconnected unit, or if the connection is for unformatted input/output, the variable is assigned the value 'UNDEFINED'. For a file that is not open, if the encoding method cannot be determined the variable is assigned the value 'UNKNOWN'.

<Related>

INQUIRE statement, OPEN statement