Java QUrl url = new QUrl(); String strJsUrl; ... this.url.setUrl(this. strJsUrl); this.strJsUrl = ""; if (this.url.queryItems().size() > 0) { this.strJsUrl = "?" + this.strJsUrl; for (QPair pair : this.url.queryItems()) { this.strJsUrl += pair.first + "="; this.strJsUrl += QUrl.toPercentEncoding(pair.second.toString(), new QByteArray("/,,/,\\,?,:,@,&,=,+,$,#,-,_,.,!,~,*,',(,)")); this.strJsUrl += "&"; } this.strJsUrl = this.strJsUrl.substring(0, this.strJsUrl .length() - 1); } this.strJsUrl = "http://" + this.url.host() + this.url.path() + this.strJsUrl;
QUrl::toPercentEncoding("google.com.ua/search?hl=ru&q=квартиры+киева&start=30&sa=N", "/?=+&")
JavaQUrl.toPercentEncoding("http://www.google.com.ua/search?hl=ru&q=квартиры+киева&start=30&sa=N", new QByteArray("/,,/,\\,?,:,@,&,=,+,$,#,-,_,.,!,~,*,',(,)"))