[Qt-interest] [SOLVED] Re: argv & utf-8 code
Aaron Lewis
aaron.lewis1989 at gmail.com
Sun Aug 1 04:21:42 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 08/01/2010 10:03 AM, 1+1=2 wrote:
> w.readFileToBuffer(QString(*(++argv)));
>
> if your are sure that *(++argv) is an utf-8 encoded string,
>
> your should use:
> w.readFileToBuffer(QString::fromUtf8(*(++argv)));
>
> or your can use:
> QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
> w.readFileToBuffer(QString(*(++argv)));
Wow , it works for now , i really appreciate it. Thanks !
>
> read QString Class Reference to get more infomation.
>
> Debao
>
- --
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4R0NL3WI5 on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkxU2jYACgkQvf41sEptMqB0GQCcCfKzeLIs/4oTL4vJ/t45OC/f
iNMAoKKuoXGtGzOMmTq/gyAiDBmnSHCF
=vknB
-----END PGP SIGNATURE-----
More information about the Qt-interest-old
mailing list