Class Charset.Decoder

Inheritance graph
Charset.Decoder Charset.Encoder
Description

Virtual base class for charset decoders.

Decoders take a stream of bytes and convert them to a (possibly wide) string of Unicode code points.

Example

string win1252_to_string( string(8bit) data ) { return Charset.decoder("windows-1252")->feed( data )->drain(); }

See also

decoder(), Encoder


Variable charset

string Charset.Decoder.charset

Description

Canonical name of the charset - giving this name to decoder returns an instance of the same class as this object.

Note

This is not necessarily the same name that was actually given to decoder to produce this object.