The CharacterSet intrinsic class provides information on character set translations and can be used to translate between the Unicode character set that the T3 VM uses internally for string values and the local character set or sets used for display, keyboard input, and file I/O.
CharacterSet : Object
Superclass Tree (in declaration order)
Summary of Properties
Summary of Methods
Get the name of the character set. This simply returns the name that was given to construct the character set.
Determine if a character or string of characters is mappable to this character set. If the input is an integer, it represents the Unicode character code for a single character; if the input is a string, each character in the string is checked. This returns true if every character given has a valid mapping in the local character set, nil if not. Note that if a string is given, and even one character is not mappable, this returns nil.
Determine if the mapping is known. This returns true if the character set has a known local mapping, nil if not. Note that it doesn't matter whether or not the character set is actually in use on the local platform; all that matters is that a T3 mapping file is available on this machine.
Determine if a character or string of characters is "round-trip" mappable to this character set. If the input is an integer, it represents a Unicode character code to be tested; if the input is a string, each character in the string is tested. Returns true if every character given has a valid round-trip mapping, nil if not.
A character has a round-trip mapping if it can be mapped to this local character set and then back to Unicode to yield the original character. If a character has a round-trip mapping, then in general the character has an exact representation in the local character set (as opposed to an approximation: if 'a-umlaut' maps to a simple unaccented 'a', or to 'ae', then it has only an approximated representation).
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3