#include <textcodec.h>
Public Methods | |
virtual bool | isAbleToConvert (Encodings::MIB mib) |
Is the codec able to convert specified encoding? More... | |
virtual void | fillInMapArray (XmlEncoding *info, Encodings::MIB mib) |
Fill in the expat encoding structure. More... | |
virtual int | convert (const char *s, Encodings::MIB mib) |
Convert given char to gven encoding. More... | |
virtual void | release (Encodings::MIB mib) |
Release function called by expat. More... | |
virtual Encodings::MIB | getMIB (const XmlChar *encoding) throw (ExaltUnknownEncodingException) |
Get the MIB of the encoding. More... | |
virtual bool | knowsMIB (Encodings::MIB mib) |
Does the codec know the encoding? More... | |
virtual unsigned long | suggestAlphabetBaseSize (Encodings::MIB mib) throw (ExaltUnknownEncodingException) |
Suggest suitable alphabet size for given encoding. More... | |
virtual void | output (IODevice *device, XmlChar c, Encodings::MIB toEncoding) throw (ExaltEncodingException, ExaltIOException) |
Output a char converted to given encoding. More... | |
virtual void | output (IODevice *device, const XmlChar *str, Encodings::MIB toEncoding) throw (ExaltEncodingException, ExaltIOException) |
Output a string converted to given encoding. More... | |
virtual void | output (IODevice *device, const XmlChar *str, size_t length, Encodings::MIB toEncoding) throw (ExaltEncodingException, ExaltIOException) |
Output a string of given length converted to given encoding. More... |
The functionality of the codec if rather basic, but it offers an unified interface for character sets conversions.
Definition at line 53 of file textcodec.h.
|
Convert given char to gven encoding. Converts a char to given encoding.
Definition at line 232 of file textcodec.cpp. |
|
Fill in the expat encoding structure. This method fills in the Expat's info structure (see the Expat documentation) according to the given MIB.
Definition at line 190 of file textcodec.cpp. References EXPAT_MAP_SINGLE_BYTE_ENCODING_TO_UTF8, and XmlEncoding. Referenced by XmlParser::unknownEncoding. |
|
Get the MIB of the encoding. Returns the MIB of the encoding that was specified by its name.
Definition at line 296 of file textcodec.cpp. References ENCODING_MIB, ERR, and XmlChar. Referenced by XmlSimpleModel::manageEvent, XmlAdaptiveModel::manageEvent, and XmlParser::unknownEncoding. |
|
Is the codec able to convert specified encoding?
Definition at line 165 of file textcodec.cpp. Referenced by XmlParser::unknownEncoding. |
|
Does the codec know the encoding? This method tests whether the text codec knows given encoding.
Definition at line 271 of file textcodec.cpp. References ENCODING_NAMES, Encodings::EncodingName::mib, and Encodings::EncodingName::name. |
|
Output a string of given length converted to given encoding. Sends a string of specified length converted to given encoding to the output device.
Definition at line 409 of file textcodec.cpp. |
|
Output a string converted to given encoding. Sends a string converted to given encoding to the output device.
Definition at line 382 of file textcodec.cpp. |
|
Output a char converted to given encoding. Sends a character converted to given encoding to the output device.
Definition at line 357 of file textcodec.cpp. |
|
Release function called by expat. This function gets called by Expat after performing the conversion. Here it does nothing.
Definition at line 254 of file textcodec.cpp. |
|
Suggest suitable alphabet size for given encoding.
Definition at line 145 of file textcodec.cpp. References DEFAULT_ALPHABET_BASE_SIZE, and ENCODING_SIZE. Referenced by KYGrammar::appendToRootRule, XmlSimpleModel::manageEvent, and XmlAdaptiveModel::manageEvent. |