kcmdlineargs input decoding

Thiago Macieira thiago at kde.org
Wed Feb 25 15:34:35 GMT 2009


Em Quarta-feira 25 Fevereiro 2009, às 16:07:06, Nick Shaforostoff escreveu:
> Hi. Opening files with non-ASCII names via cmd line in any KDE app
> isn't possible on my system,
> as args are misencoded due to QString::fromLocal8Bit() returning
> different data before and after QApplication creation.
>
> Attached patch fixes the issue by delaying conversion and moving it to
> KCmdLineArgs::arg(),
> as a side affect it switches KCmdLineArgs args processing to use
> QByteArray internaly,
> which is a little bit more memory efficient.

We've already added a workaround to make it work with QString, but that 
requires a patch not available for 4.5.0-rc1.

In any case, yes, this will remain like that: you're not allowed to use 
QString::{from,to}Local8Bit() before QCoreApplication. The workaround is not 
meant to be used in other applications.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Software
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090225/d5a677f9/attachment.sig>


More information about the kde-core-devel mailing list