[Qt-interest] character-encoding type of system locale
Thiago Macieira
thiago at kde.org
Tue Jun 29 19:54:26 CEST 2010
On Tuesday 29 June 2010 11:15:07 Chen, Jacob wrote:
> Hi All,
>
> Does anyone know which class or API which I can use to get the current
> character-encoding type of system locale?
There's no API for that.
Your only guarantee is that QString::fromLocal8Bit and QString::toLocal8Bit
will use this encoding, and that the codec returned by
QTextCodec::codecForLocale uses it too.
On all recent systems, that codec will be of type "System".
Why do you need to know which codec the locale uses?
Note: the locale codec does not work before you construct QCoreApplication.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100629/0db0c9b7/attachment.bin
More information about the Qt-interest-old
mailing list