KCharsets Class Reference
#include <kcharsets.h>
Detailed Description
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.
- Author:
- Lars Knoll <knoll@kde.org>
Definition at line 43 of file kcharsets.h.
Public Member Functions | |
virtual | ~KCharsets () |
QTextCodec * | codecForName (const QString &name) const |
QTextCodec * | codecForName (const QString &n, bool &ok) const |
QStringList | availableEncodingNames () |
QStringList | descriptiveEncodingNames () |
QString | languageForEncoding (const QString &encoding) |
QString | encodingForName (const QString &descriptiveName) |
Static Public Member Functions | |
static QChar | fromEntity (const QString &str) |
static QChar | fromEntity (const QString &str, int &len) |
static QString | toEntity (const QChar &ch) |
static QString | resolveEntities (const QString &text) |
Protected Member Functions | |
KCharsets () | |
Friends | |
class | KGlobal |
Constructor & Destructor Documentation
|
Protected constructor. If you need the kcharsets object, use KGlobal::charsets() instead. Definition at line 360 of file kcharsets.cpp. |
|
Destructor.
Definition at line 365 of file kcharsets.cpp. |
Member Function Documentation
|
Lists all available encodings as names.
Definition at line 475 of file kcharsets.cpp. |
|
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
Definition at line 528 of file kcharsets.cpp. |
|
Provided for compatibility.
Definition at line 522 of file kcharsets.cpp. |
|
Lists the available encoding names together with a more descriptive language.
Definition at line 509 of file kcharsets.cpp. |
|
Returns the encoding for a string obtained with descriptiveEncodingNames().
Definition at line 492 of file kcharsets.cpp. |
|
Overloaded member function. Tries to find an entity in the QString str.
Definition at line 406 of file kcharsets.cpp. |
|
Converts an entity to a character. The string must contain only the entity without the trailing ';'.
Definition at line 370 of file kcharsets.cpp. |
|
Returns the language the encoding is used for.
Definition at line 485 of file kcharsets.cpp. |
|
Scans the given string for entities (like &) and resolves them using fromEntity.
Definition at line 429 of file kcharsets.cpp. |
|
Converts a QChar to an entity. The returned string does already contain the leading '&' and the trailing ';'.
Definition at line 422 of file kcharsets.cpp. |
The documentation for this class was generated from the following files: