[Qt-interest] Char format in a text file
Thiago Macieira
thiago at kde.org
Thu Apr 15 19:25:59 CEST 2010
Em Quinta-feira 15 Abril 2010, às 18:05:14, Gian Marco Gallo escreveu:
> Good afternoon
>
> Is there a way to understand via Qt the character set of a text file? I
> mean: how can i understand via Qt if the file is UTF-8 or ASCII or so on
> encoded?
Not really.
You can try and decode as UTF-8 and see if you succeed. And if you see no
high-byte characters, it's probably ASCII.
But it's always "probably". There's no way to know for certain.
--
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/20100415/9e8f80d0/attachment.bin
More information about the Qt-interest-old
mailing list