{"action":"created","issue":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/12216","labels_url":"https://api.github.com/repos/ariya/phantomjs/issues/12216/labels{/name}","comments_url":"https://api.github.com/repos/ariya/phantomjs/issues/12216/comments","events_url":"https://api.github.com/repos/ariya/phantomjs/issues/12216/events","html_url":"https://github.com/ariya/phantomjs/issues/12216","id":33180380,"number":12216,"title":"page.url not round-trippable when URL is non-ASCII","user":{"login":"zackw","id":325899,"avatar_url":"https://avatars.githubusercontent.com/u/325899?v=3","gravatar_id":"","url":"https://api.github.com/users/zackw","html_url":"https://github.com/zackw","followers_url":"https://api.github.com/users/zackw/followers","following_url":"https://api.github.com/users/zackw/following{/other_user}","gists_url":"https://api.github.com/users/zackw/gists{/gist_id}","starred_url":"https://api.github.com/users/zackw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackw/subscriptions","organizations_url":"https://api.github.com/users/zackw/orgs","repos_url":"https://api.github.com/users/zackw/repos","events_url":"https://api.github.com/users/zackw/events{/privacy}","received_events_url":"https://api.github.com/users/zackw/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ariya/phantomjs/labels/1.x","name":"1.x","color":"94b8d1"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/2.0","name":"2.0","color":"52a6e0"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/Bug","name":"Bug","color":"f45d43"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/Dev","name":"Dev","color":"52a6e0"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/In%20progress","name":"In progress","color":"FEF2C0"},{"url":"https://api.github.com/repos/ariya/phantomjs/labels/Patch%20available","name":"Patch available","color":"FFC274"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-05-09T15:09:56Z","updated_at":"2015-08-03T16:08:36Z","closed_at":null,"body":"The implementation of `page.url` calls `QUrl::toString()` with no special options, which produces a Unicode string, with all non-ASCII characters decoded assuming UTF-8.  This is fine when what you want is to display the URL to an end-user, but it's broken when you want to be able to store the URL and re-access the same webpage later. Many websites still use ISO-8859-n, KOI8-R, or other \"legacy\" encodings in their URL structure; when such a URL is decoded as if it were UTF-8, you get a bunch of U+FFFDs and information is lost.\r\n\r\nPlease add a way to get the string that `QUrl::toEncoded()` would return.  (I'm not sure this is *enough* for my purposes, but to the extent it isn't, it's a problem with QUrl itself and you probably can't do anything about it. :-/ )"},"comment":{"url":"https://api.github.com/repos/ariya/phantomjs/issues/comments/127290749","html_url":"https://github.com/ariya/phantomjs/issues/12216#issuecomment-127290749","issue_url":"https://api.github.com/repos/ariya/phantomjs/issues/12216","id":127290749,"user":{"login":"zackw","id":325899,"avatar_url":"https://avatars.githubusercontent.com/u/325899?v=3","gravatar_id":"","url":"https://api.github.com/users/zackw","html_url":"https://github.com/zackw","followers_url":"https://api.github.com/users/zackw/followers","following_url":"https://api.github.com/users/zackw/following{/other_user}","gists_url":"https://api.github.com/users/zackw/gists{/gist_id}","starred_url":"https://api.github.com/users/zackw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zackw/subscriptions","organizations_url":"https://api.github.com/users/zackw/orgs","repos_url":"https://api.github.com/users/zackw/repos","events_url":"https://api.github.com/users/zackw/events{/privacy}","received_events_url":"https://api.github.com/users/zackw/received_events","type":"User","site_admin":false},"created_at":"2015-08-03T16:08:36Z","updated_at":"2015-08-03T16:08:36Z","body":"It's 2.x as of a couple weeks ago, is that not new enough?\n"}}