Thanks for tips. Unfortunately "Accept-Charset" has no effect on server. Also QString:toLocal8Bit() seems not working; here a small piece of code:
QUrlQuery postData;
postData.
addQueryItem( QLatin1String( "pass" ), pass.
toLocal8Bit() );
qDebug
() << postData.
query( QUrl::EncodeUnicode );
QString pass = "À";
QUrlQuery postData;
postData.addQueryItem( QLatin1String( "pass" ), pass.toLocal8Bit() );
qDebug() << postData.query( QUrl::EncodeUnicode );
To copy to clipboard, switch view to plain text mode
output is "pass=c%C3%80"
EDIT 1:
postData.query( QUrl::PrettyDecoded ) returns
"pass=\xC0"
that's very close to "%C0"
EDIT 2:
The following code seems working:
QUrl(pass
).
toString(QUrl::PrettyDecoded).
toLatin1().
toPercentEncoding()
QUrl(pass).toString(QUrl::PrettyDecoded).toLatin1().toPercentEncoding()
To copy to clipboard, switch view to plain text mode
Bookmarks