589 #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) 597 #if defined (_XOPEN_UNIX) && !defined(Q_OS_QNX) && !defined(Q_OS_OSF) 599 char *charset = nl_langinfo (CODESET);
617 #if !defined(QT_NO_SETLOCALE) 618 const QByteArray ctype = setlocale(LC_CTYPE, 0);
626 if (lang.
isEmpty() || lang ==
"C") {
629 if (lang.
isEmpty() || lang ==
"C") {
643 int indexOfDot = ctype.
indexOf(
'.');
644 if (indexOfDot != -1)
649 indexOfDot = lang.
indexOf(
'.');
650 if (indexOfDot != -1)
668 const QByteArray &try_by_name = (!ctype.
isEmpty() && ctype !=
"C") ? lang : ctype;
672 if (try_locale_list(iso8859_15locales, lang))
674 else if (try_locale_list(iso8859_2locales, lang))
676 else if (try_locale_list(iso8859_3locales, lang))
678 else if (try_locale_list(iso8859_4locales, lang))
680 else if (try_locale_list(iso8859_5locales, lang))
682 else if (try_locale_list(iso8859_6locales, lang))
684 else if (try_locale_list(iso8859_7locales, lang))
686 else if (try_locale_list(iso8859_8locales, lang))
688 else if (try_locale_list(iso8859_9locales, lang))
690 else if (try_locale_list(iso8859_13locales, lang))
692 else if (try_locale_list(tis_620locales, lang))
694 else if (try_locale_list(koi8_ulocales, lang))
696 else if (try_locale_list(cp_1251locales, lang))
698 else if (try_locale_list(pt_154locales, lang))
700 else if (try_locale_list(probably_koi8_rlocales, lang))
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
The QByteArray class provides an array of bytes.
QByteArray mid(int index, int len=-1) const
Returns a byte array containing len bytes from this byte array, starting at position pos...
int indexOf(char c, int from=0) const
Returns the index position of the first occurrence of the character ch in the byte array...
static QTextCodec * codecForName(const QByteArray &name)
Searches all installed QTextCodec objects and returns the one which best matches name; the match is c...
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
static QTextCodec * localeMapper
QBool contains(char c) const
Returns true if the byte array contains the character ch; otherwise returns false.