<<

Contents

Search

>>

 

INPUT_CHARSET

 

 

Instruction

 

 

Syntax:

INPUT_CHARSET = <Character Set>

 

<Character Set> = <STRING-EXPRESSION>

 

Meaning:

Defines the character set used to read a sequential file.

 

When a file that has been opened with OPEN INPUT is read under Java, all input characters are interpreted as characters of the standard character set of the computer.

 

The instruction INPUT_CHARSET can specify a different character set. The available character sets can be found in the Java documentary with the class Charset.

 

The instruction INPUT_CHARSET = "" enables the standard character set again.

 

The following standard charsets are available:

 

Charset

 

Description

US-ASCII

Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set

ISO-8859-1

ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1

UTF-8

Eight-bit UCS Transformation Format

UTF-16BE

Sixteen-bit UCS Transformation Format, big-endian byte order

UTF-16LE

Sixteen-bit UCS Transformation Format, little-endian byte order

UTF-16

Sixteen-bit UCS Transformation Format, byte order identified by an optional byte-order mark

 

Parameter:

Character Set

Name of character set

 

Sample:

/* read characters with OEM character set

 

INPUT_CHARSET = "CP850"

OPEN INPUT 1,"TEST.DAT" ON ERROR … Error … END

LINE INPUT 1,LINE$ ON ERROR … Error … END

CLOSE 1 ON ERROR END

 

See also:

OPEN

INPUT

LINE_INPUT

OUTPUT_CHARSET