KCodecs
kcharsets.cpp
219 0, 11, 28, 11, 40, 11, 52, 11, 60, 11, 67, 78, 95, 78, 106, 117, 124, 117, 136, 148, 169, 78, 177, 185, 193, 117, 201, 208, 217, 208, 228,
220 208, 236, 208, 243, 208, 250, 255, 275, 255, 286, 294, 313, 294, 317, 294, 324, 331, 338, 331, 350, 355, 364, 355, 376, 355, 383, 394, 400, 394, 408, 419,
221 426, 419, 434, 445, 452, 445, 465, 445, 473, 185, 484, 491, 496, 491, 508, 514, 522, 514, 529, 514, 534, 514, 539, 514, 555, 568, 574, 568, 581, 568, -1};
320 * - using ISO-8859-1 for ASCII is only an approximation (as you cannot test if a character is part of the set)
397 static const int builtin_indices[] = {0, 11, 18, 11, 30, 39, 50, 39, 58, 39, 64, 82, 88, 93, 109, 93, 120, 135, 143, 135, 158, 164,
398 168, 164, 175, 164, 189, 196, 201, 208, 214, 221, 233, 240, 246, 240, 262, 240, 278, 240, 294, 240, 310, 240,
399 326, 240, 342, 240, 358, 368, 373, 368, 368, 368, 383, 395, 400, 411, 418, 429, 436, 411, 448, 429, 460, 469,
400 481, 493, 505, 517, 524, 517, 535, 517, 542, 208, 557, 208, 572, 469, 582, 469, 592, 469, 596, 383, -1};
428 * - 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.
448 static const int conversion_hints_indices[] = {0, 7, 18, 25, 36, 18, 43, 50, 63, 50, 76, 50, -1};
462 static inline const char *kcharsets_array_search(const char *start, const int *indices, const char *entry)
478 return std::any_of(aliases.constBegin(), aliases.constEnd(), [name](const QByteArray &aliasName) {
620 const char *lang = kcharsets_array_search(language_for_encoding_string, language_for_encoding_indices, encoding.toUtf8().data());
622 return tr("%1 ( %2 )", "@item %1 character set, %2 encoding").arg(tr(lang, "@item Text character set"), encoding);
652 const QString description = tr(language_for_encoding_string + p[1], "@item Text character set");
653 encodings.append(tr("%1 ( %2 )", "@item Text encoding: %1 character set, %2 encoding").arg(description, name));
667 const QString description = tr(language_for_encoding_string + p[1], "@item Text character set");
779 // We have had no luck with QTextCodec::codecForName, so we must now process the name, so that QTextCodec::codecForName could work with it.
void append(const T &value)
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const const
Definition: kcharsets.h:41
QByteArray toLower() const const
QString encodingForName(const QString &descriptiveName) const
Returns the encoding for a string obtained with descriptiveEncodingNames().
Definition: kcharsets.cpp:628
QString fromUtf8(const char *str, int size)
CaseInsensitive
QString trimmed() const const
Q_SCRIPTABLE Q_NOREPLY void start()
void chop(int n)
QByteArray toLatin1() const const
QList::const_iterator constBegin() const const
QList< QStringList > encodingsByScript() const
Lists the available encoding names grouped by script (or language that uses them).
Definition: kcharsets.cpp:659
const QChar * unicode() const const
QTextCodec * codecForName(const QString &name) const
Provided for compatibility.
Definition: kcharsets.cpp:684
int lastIndexOf(QChar ch, int from, Qt::CaseSensitivity cs) const const
Q_GLOBAL_STATIC(Internal::StaticControl, s_instance) class ControlPrivate
QTextCodec * codecForLocale()
bool isEmpty() const const
QByteArray toUtf8() const const
int length() const const
QTextCodec * codecForName(const QByteArray &name)
int toInt(bool *ok, int base) const const
static QString resolveEntities(const QString &text)
Scans the given string for entities (like &) and resolves them using fromEntity.
Definition: kcharsets.cpp:559
Null
QStringList availableEncodingNames() const
Lists all available encodings as names.
Definition: kcharsets.cpp:608
QString & remove(int position, int n)
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const const
LocaleWrapper locale()
QString descriptionForEncoding(const QString &encoding) const
Returns a long description for an encoding name.
Definition: kcharsets.cpp:618
bool isEmpty() const const
QList::const_iterator constEnd() const const
QString left(int n) const const
QString name(StandardShortcut id)
QChar * data()
KGuiItem ok()
int length() const const
static QChar fromEntity(const QString &str)
Converts an entity to a character.
Definition: kcharsets.cpp:492
QString asprintf(const char *cformat,...)
QString mid(int position, int n) const const
QStringList descriptiveEncodingNames() const
Lists the available encoding names together with a more descriptive language.
Definition: kcharsets.cpp:647
bool isNull() const const
char * data()
ushort unicode() const const
void sort(Qt::CaseSensitivity cs)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:06:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:06:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.