HREF=UTF-8 String <a href="http://%E9%A3%9F....." doesn't work
The problem that I have is IDN (International Domain Name) UTF-8 string set in the Web Page's < a href="
I have create the test case reside in the http://ecotw101.com/test_href_idn.html There are 2 lines in the page content 1st line: htef using the Chinese character input string and just like the type into the browser URL , both will works (connet to HTTP server) 2nd line: href using the UTF-8 3bytes encoding for each character and after it send to Apache Server, it get the following err message " Server not found
Firefox can't find the server at %e9%a3%9f%e7%89%a9%e5%85%8d%e8%b2%bb.%e6%85%88%e5%96%84%e7%b6%b2.net. "
The test case works fine with the Chrome browser.
Since the href content was generated from HTML editor or QR redirect program, it is UTF-8 format. Firefox use it for connect to Web Server and got error.
Don't know how Chrome handle the case. I guess that Chrome might do a convert from UTF-8 to PunyCode of IDN.
IE has the same problem. This problem will happen on the mobile smart phone after scan a QR code which use an IDN for redirecting the Web site.
Thanks !
- Mike
code edited to get rid of the whole paragraph worth of hyperlink - ed
Modificadas por the-edmeister el
Todas las respuestas (4)
network.standard-url.encode-utf8 = true (default: false) network.standard-url.escape-utf8 = false currently is true
If you change that second setting does it help? It did not for me but I saw back in version 3 this was a feature that was proposed fixed. https://bugzilla.mozilla.org/show_bug.cgi?id=552273 for reference. It I may ask is this the only site that does this?
You can't have escaped cod in the first TLD part of the link. You can only have puny code in that part.
Note that the .net domain isn't whitelisted via a network.IDN.whitelist.net pref.
Thanks for replying.
Have tried to set network.standard-url.escape-utf8 = false and restart the Firefox and it still can't solve the problem.
Chrome browser works fine.
I guess Firefox might need to convert the href=" %xx%xx ..." into the href="//xn--94qz02fu7 ...: punycode and then use the punycode to get name resolve.
- Mike
Just to follow up: Bug 309671 was the actual bug, as one of the bugzilla contributors/engineers informed me. They are looking for help if you would like to read up on the discussion for this issue. Thank you for your time.