使用QT开发软件时,如果想将URL以UTF8之外的非主流字符集来编码的话,就要用到QByteArray的toPercentEncdoing()方法与 QTextCodec来配合实现。
http://www.qtcn.org/bbs/read-htm-tid-44201-fpage-8.html
亮点 :
可以用QByteArray的toPercentEncdoing()方法,比如:
QString strUtf8 = "....";
QString strUtf8UrlEncoding = QUrl::toPercentEncoding(strUtf8);
QByteArray baGBK = QTextCodec::codecForName("GBK")->fromUnicode(strUtf8);
QString strGBKUrlEncoding(baGBK.toPercentEncoding());
未知美女
HxLauncher: Launch Android applications by voice commands