charsetName Property

Class: IO

Description

This property contains the name of the characterset that is used to translate characters when IO.read() or IO.write() is called.

 

On input operations, characters read from the device is translated from IO.charsetName into Runtime.charsetName.

 

On output operations, characters written to the device is translated from Runtime,charsetName to IO.charsetName.

 

The value of this property is interpreted only by IO.open(). The supplied or implied value must be supported by the device; otherwise IO.open() throws an exception.

Syntax

type String IOObject.charsetName="UTF-8"

Returns

A String

When Became Available

Profile V7.0

Example

type IO IOD = Class.new("IO")

 

type String EMPTY = IOD.charsetName // empty string

 

set IOD.directory = "/home/"

set IOD.file = "output.txt"

do IOD.open()

 

type String CHARSET = IOD.charsetName // may have been set by open()