On quarta-feira, 26 de dezembro de 2012 15.54.25, Nikos Chantziaras wrote: > I need the actual name of the character set from which > QFile::decodeName() is converting. The docs say that it's the "local > 8-bit encoding."
Yes, it's the codec that QString::to/fromLocal8Bit works on. > I'm not sure what that means, but I suppose it's the codec returned by > QTextCodec::codecForLocale(). Unfortunately, this: > > QTextCodec::codecForLocale()->name() Correct. > returns "System" on platforms that come with a Qt that uses ICU (pretty > much all Linux distributions.) With an ICU-less Qt build, I get the > correct name, like "UTF-8" or "UTF-16LE", which what I need. > > Is there anything I can do? And are QFile's decodeName() and > encodeName() functions actually using the codecForLocale() codec to > begin with? There is no Qt API to return that value. You can use the Windows API, POSIX API or ICU API to find out by yourself. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
