URL があります: https://example.com/hello?param=first:last
。としてパーセントエンコードする必要があると思いhttps://example.com/hello?param=first%3Alast
ます。しかし、Qt はそのままにしておきます。私のコード:
QUrl url("https://example.com/hello?param=first:last");
printf("Encoded: %s\n", url.toEncoded().constData());
コロンはどのようにエンコードすればよいですか? QString::toPercentEncoding
?を使用してパラメーターを手動でフォーマットします。