when pass same unicode argument qt5->projects->run app works, fails if passed argument directly exe. arguments being passed webpage encoded using encodeuricomponent in javascript.
the code is:
int main(int argc, char *argv[]) { qapplication a(argc, argv); if(a.arguments().count() < 2) { qfatal("no argument provided"); return exit_failure; } qstringlist args = a.arguments().at(1).split("####"); qstring param1 = args.at(1); qurl downurl = qurl::frompercentencoding(param.tolocal8bit()); .......... }
figured out, using param.toutf8() in above code fixes this.
Comments
Post a Comment