|
|
Charset font and encoder/decoder handling.
This is needed, because Qt's font matching algorithm gives the font family a higher priority than the charset. For many applications this is not acceptable, since it can totally obscure the output, in languages which use non iso-8859-1 charsets.
| KCharsets ()
| KCharsets |
[protected]
protected constructor. If you need the kcharsets object, use KGlobal::charsets() instead.
| ~KCharsets ()
| ~KCharsets |
[virtual]
destructor
| QTextCodec * codecForName (const QString &name)
| codecForName |
[const]
provided for compatibility.
| QTextCodec * codecForName (const QString &n, bool &ok)
| codecForName |
[const]
tries to find a QTextCodec to convert the given encoding from and to Unicode. If no codec could be found the latin1 codec will be returned an ok will be set to false.
| QChar fromEntity (const QString &str)
| fromEntity |
[static]
converts an entity to a character. The string must contain only the entity without the trailing ';'.
Returns: QChar::null if the entity could not be decoded.
| QChar fromEntity (const QString &str, int &len)
| fromEntity |
[static]
Overloaded member function. Tries to find an entity in the QString str.
Parameters:
| len | is a return value, that gives the length of the decoded entity. |
Returns: a decoded entity if one could be found, QChar::null otherwise
| QString toEntity (const QChar &ch)
| toEntity |
[static]
converts a QChar to an entity. The returned string does already contain the leading '&' and the trailing ';'.
| QStringList availableEncodingNames ()
| availableEncodingNames |
Lists all available encodings as names.
| QStringList descriptiveEncodingNames ()
| descriptiveEncodingNames |
Lists the available encoding names together with a more descriptive language.
| QStringList languages ()
| languages |
Lists all languages.
| QStringList encodingsForLanguage ( const QString &language )
| encodingsForLanguage |
Lists all available encodings for language name 'language'.
| QString languageForEncoding ( const QString &encoding )
| languageForEncoding |
returns the language the encoding is used for.
| QString encodingForName ( const QString &descriptiveName )
| encodingForName |
returns the encoding for a string obtained with descriptiveEncodingNames()