Class TableCodec.

Inherits Codec. Inherited by Cp1250Codec, Cp1251Codec, Cp1252Codec, Cp1253Codec, Cp1254Codec, Cp1255Codec, Cp1256Codec, Cp1257Codec, Cp1258Codec, Cp437Codec, Cp737Codec, Cp775Codec, Cp850Codec, Cp852Codec, Cp855Codec, Cp857Codec, Cp860Codec, Cp861Codec, Cp862Codec, Cp863Codec, Cp864Codec, Cp865Codec, Cp866Codec, Cp869Codec, Cp874Codec, EbcdicCodec, HpRoman8Codec, Iso885910Codec, Iso885911Codec, Iso885913Codec, Iso885914Codec, Iso885915Codec, Iso885916Codec, Iso88592Codec, Iso88593Codec, Iso88594Codec, Iso88595Codec, Iso88596Codec, Iso88597Codec, Iso88598Codec, Iso88599Codec, Koi8RCodec, Koi8UCodec, MacRomanCodec, Unknown8BitCodec and VisciiCodec.

The TableCodec provides a codec for simple 256-entry character sets.

A great many characters sets, such as ISO 8859-2, fit in one byte and have a fixed known mapping to Unicode. This class provides a map to and from Uncode for such character sets. Each character set must subclass this, but no reimplementation is necessary.

Codecs which map 0x80-0x9F to U+0080-0x009F consider any strings which contain 0x80-0x9F badly formed.

At the moment, the fromUnicode function is rather slow. This may need fixing later.

TableCodec::TableCodec( const uint * table, const char * name )

Creates an empty TableCodec mapping to/from Unicode using table and named name.

EString TableCodec::fromUnicode( const UString & u )

Converts u from Unicode to the subclass' character encoding. All Unicode code points which cannot be representated in that encoding are converted to '?'.

Reimplements Codec::fromUnicode().

UString TableCodec::toUnicode( const EString & s )

Converts s from the subclass' character encoding to Unicode.

Reimplements Codec::toUnicode().

This web page based on source code belonging to The Archiveopteryx Developers. All rights reserved.