On 26/12/12 16:16, Thiago Macieira wrote: > 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. [...] Unfortunately, this: >> >> QTextCodec::codecForLocale()->name() >> >> returns "System" on platforms that come with a Qt that uses ICU (pretty >> much all Linux distributions.) [...] >> >> Is there anything I can do? > > 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.
Too bad. Though the API *is* there. It's QTextCodec::name() and QTextCodec::aliases(). IMO it's a mistake by Qt to return "System" there, since "System" has exactly zero use. Or at least QTextCodec::aliases() should contain the actual name in one of its elements. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest