KDECore
kcharsets.cpp
Go to the documentation of this file.
330 * - using ISO-8859-1 for ASCII is only an approximation (as you cannot test if a character is part of the set)
437 * - KDE had always "CP 1251" as best fallback to PT 154. As Qt does not offer this encoding anymore, the codepage 1251 is used as fallback.
664 const QString description = i18nc( "@item Text character set", language_for_encoding_string + p[1] );
679 const QString description = i18nc("@item Text character set", language_for_encoding_string + p[1] );
754 // We have had no luck with QTextCodec::codecForName, so we must now process the name, so that QTextCodec::codecForName could work with it.
796 // ### TODO: while emergency conversions might be useful at read, it is not sure if they should be done if the application plans to write.
QString languageForEncoding(const QString &encoding) const
Returns the language the encoding is used for.
Definition: kcharsets.cpp:618
QTextCodec * codecForName(const QString &name) const
Provided for compatibility.
Definition: kcharsets.cpp:696
QStringList descriptiveEncodingNames() const
Lists the available encoding names together with a more descriptive language.
Definition: kcharsets.cpp:659
QByteArray toLower() const
#define I18N_NOOP2(comment, x)
If the string is too ambiguous to be translated well to a non-english language, use this instead of I...
Definition: klocalizedstring.h:72
void chop(int n)
bool isEmpty() const
bool startsWith(const QByteArray &ba) const
static const int language_for_encoding_indices[]
Definition: kcharsets.cpp:222
QString & remove(int position, int n)
QString i18nc(const char *ctxt, const char *text)
Returns a localized version of a string and a context.
Definition: klocalizedstring.h:797
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const
QList< QStringList > encodingsByScript() const
Lists the available encoding names grouped by script (or language that uses them).
Definition: kcharsets.cpp:672
void append(const T &value)
QString fromUtf8(const char *str, int size)
QStringList availableEncodingNames() const
Lists all available encodings as names.
Definition: kcharsets.cpp:608
QString descriptionForEncoding(const QString &encoding) const
Returns a long description for an encoding name.
Definition: kcharsets.cpp:630
QTextCodec * codecForEncoding() const
Returns the user's preferred encoding.
Definition: klocale.cpp:650
bool isEmpty() const
QString trimmed() const
const char * constData() const
static QString toEntity(const QChar &ch)
Converts a QChar to an entity.
Definition: kcharsets.cpp:555
QString encodingForName(const QString &descriptiveName) const
Returns the encoding for a string obtained with descriptiveEncodingNames().
Definition: kcharsets.cpp:642
ushort unicode() const
bool isNull() const
const QChar * unicode() const
QByteArray toLatin1() const
static QString resolveEntities(const QString &text)
Scans the given string for entities (like &) and resolves them using fromEntity.
Definition: kcharsets.cpp:562
QString mid(int position, int n) const
static QChar fromEntity(const QString &str)
Converts an entity to a character.
Definition: kcharsets.cpp:496
static const char * kcharsets_array_search(const char *start, const int *indices, const char *entry)
Definition: kcharsets.cpp:459
QString & sprintf(const char *cformat,...)
QTextCodec * codecForName(const QByteArray &name)
int length() const
static const char language_for_encoding_string[]
Definition: kcharsets.cpp:155
QString left(int n) const
void sort()
QByteArray & remove(int pos, int len)
bool endsWith(const QByteArray &ba) const
QByteArray toUtf8() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.