Last Comment Bug 110028 - IDN rendering in URL bar
: IDN rendering in URL bar
Status: RESOLVED FIXED
: intl
Product: Core
Classification: Components
Component: Networking (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla1.3beta
Assigned To: Wil Tan
: Teruko Kobayashi
Mentors:
http://playground.i-dns.net/mozilla/s...
: 120744 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-14 00:39 PST by Wil Tan
Modified: 2003-06-09 09:57 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Adding IDNToUTF8HostName (1.96 KB, patch)
2002-02-06 21:04 PST, Wil Tan
no flags Details | Diff | Review
new nsIIDNService.idl with changes suggested by Darin (3.03 KB, text/plain)
2002-02-12 17:04 PST, Wil Tan
nhottanscp: review+
darin.moz: superreview+
Details
search and replace occurances of old nsIIDNService method name (4.17 KB, patch)
2002-02-18 06:18 PST, Wil Tan
nhottanscp: review+
darin.moz: superreview+
shaver: approval+
Details | Diff | Review
Turn on network.enableIDN by default. (721 bytes, patch)
2002-03-11 17:41 PST, Wil Tan
nhottanscp: review+
darin.moz: superreview+
asa: approval+
Details | Diff | Review

Description Wil Tan 2001-11-14 00:39:25 PST
IDN urls are displayed as ACE format now. It should be rendered as UTF-8.
Ideally the user shouldn't see ACE at all.

The problem is several fold.
Firstly, nsHttpChannel replaces the original UTF-8 hostname in nsIURI.Secondly,
even if the nsIURI hostname was in UTF-8, the URL representation
would be hex-encoded.
Comment 1 nhottanscp 2001-11-14 11:12:16 PST
Does the current DLL support decoding ACE? Can we add the decoding method to
nsIIDNService?
Comment 2 Wil Tan 2001-11-14 15:27:17 PST
yes we can. i'll try to do that. what do you reckon we should modify to have it
rendered as UTF-8? Is the text widget for URL bar in UTF-8?
Comment 3 nhottanscp 2001-11-14 15:47:29 PST
I just thought that the interface which encodes to ACE probably knows how to
decode it too. I think the widget takes UCS2, we already have UTF-8 to UCS2
conversion.

The other issue is where to hook up the decoder, in netwerk as soon as we get
the ACE encoded URL or somewhere else, e.g. right before we put the URL string
to the widget.
Comment 4 Wil Tan 2001-11-14 16:09:15 PST
Yes the library can decode ACE, so how about using the name 
nsIIDNService::IDNToUTF8HostName()?
Comment 5 nhottanscp 2001-11-14 16:22:41 PST
Yes, I think that's fine.


Comment 6 Boris Zbarsky [:bz] (Out June 25-July 6) 2002-01-30 22:33:59 PST
*** Bug 120744 has been marked as a duplicate of this bug. ***
Comment 7 Wil Tan 2002-02-06 21:04:23 PST
Created attachment 68263 [details] [diff] [review]
Adding IDNToUTF8HostName

Is this the right time? Or should we wait for bug 84186? Here it is anyway.
Comment 8 Darin Fisher 2002-02-06 21:15:48 PST
william: you should probably add [noscript] to these methods until bug 84186 is
resolved.  otherwise, sr=darin.

btw: wouldn't ConvertACEtoUTF8 and ConvertUTF8toACE be more appropriate function
names?  IDN isn't an encoding, right?  but UTF8 is.  ACE is an encoding (sort of).
no need for these methods to include the noun 'hostname' IMO, since these
methods are on nsIIDNService, which implies that it is dealing with hostnames.

also, a lowercase 'to' is probably better.. consistent with NS_ConvertUCS2toUTF8
and friends.
Comment 9 Wil Tan 2002-02-12 17:04:37 PST
Created attachment 69164 [details]
new nsIIDNService.idl with changes suggested by Darin

Darin: your suggested names are more apt. I don't mind changing them, Naoki?
If this looks okay, i'll submit a patch to update nsHttpChannel and
nsDnsService.
Comment 10 Darin Fisher 2002-02-12 18:04:28 PST
Comment on attachment 69164 [details]
new nsIIDNService.idl with changes suggested by Darin

looks good to me sr=darin
Comment 11 nhottanscp 2002-02-12 18:11:09 PST
Comment on attachment 69164 [details]
new nsIIDNService.idl with changes suggested by Darin

r=nhotta
Comment 12 Wil Tan 2002-02-18 06:18:05 PST
Created attachment 70067 [details] [diff] [review]
search and replace occurances of old nsIIDNService method name

This includes the nsIIDNService.idl diffs.
Comment 13 Darin Fisher 2002-02-22 13:38:07 PST
Comment on attachment 70067 [details] [diff] [review]
search and replace occurances of old nsIIDNService method name

sr=darin

once this lands and my nsIURI changes land, i can make nsIURI automatically
convert from ACE to UTF8!!  this'll make redirected URLs w/ IDN human readable
:-)
Comment 14 Wil Tan 2002-02-22 18:24:43 PST
Can this make it into 0.9.9?
Comment 15 Darin Fisher 2002-02-22 18:51:36 PST
yes it certainly can... just get an r= (nhotta?) and then send mail to
drivers@mozilla.org requesting permission to land this.  you'll need to act
quickly if you want to get this in.  this is a low-risk API change, so i suspect
they'll be happy to accept.
Comment 16 Wil Tan 2002-02-25 04:45:50 PST
Naoki, could you please r= attachment 70067 [details] [diff] [review]?
Thanks!
Comment 17 nhottanscp 2002-02-25 11:30:16 PST
Comment on attachment 70067 [details] [diff] [review]
search and replace occurances of old nsIIDNService method name

r=nhotta
Comment 18 Darin Fisher 2002-03-01 15:23:18 PST
we should try to land this when the trunk opens for mozilla 1.0

nhotta: can you take care of landing this?
Comment 19 nhottanscp 2002-03-01 15:34:38 PST
okay
Comment 20 Mike Shaver (:shaver -- probably not reading bugmail closely) 2002-03-07 12:38:48 PST
Comment on attachment 70067 [details] [diff] [review]
search and replace occurances of old nsIIDNService method name

a=shaver for the 1.0 trunk.
Comment 21 nhottanscp 2002-03-08 18:39:51 PST
checked in to the trunk
Comment 22 Wil Tan 2002-03-11 17:41:19 PST
Created attachment 73604 [details] [diff] [review]
Turn on network.enableIDN by default.

As instructed by Naoki, this should make it easier for users to try out IDN
with
Mozilla. This does not change the behavior if XPIDN was not installed.
Comment 23 Darin Fisher 2002-03-11 17:56:36 PST
william: i think that patch belongs in another bug, but if nhotta asked to have
it here, then no problem... sr=darin.
Comment 24 Darin Fisher 2002-03-11 17:56:53 PST
Comment on attachment 73604 [details] [diff] [review]
Turn on network.enableIDN by default.

sr=darin
Comment 25 nhottanscp 2002-03-12 10:01:57 PST
Comment on attachment 73604 [details] [diff] [review]
Turn on network.enableIDN by default.

r=nhotta
Comment 26 Asa Dotzler [:asa] 2002-03-14 11:41:14 PST
Comment on attachment 73604 [details] [diff] [review]
Turn on network.enableIDN by default.

a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Comment 27 nhottanscp 2002-03-14 13:48:50 PST
checked in to the trunk
Comment 28 Asa Dotzler [:asa] 2002-03-31 13:58:44 PST
Comment on attachment 70067 [details] [diff] [review]
search and replace occurances of old nsIIDNService method name

obsoleting checked in patches.
Comment 29 Asa Dotzler [:asa] 2002-03-31 13:59:41 PST
Comment on attachment 73604 [details] [diff] [review]
Turn on network.enableIDN by default.

obsoleting checked in patches so they don't look like approved changes that
haven't landed yet.
Comment 30 Jo Hermans 2003-06-08 07:29:19 PDT
Shouldn't this bug be closed ?
Comment 31 nhottanscp 2003-06-09 09:57:16 PDT
yes, this is fixed now

Note You need to log in before you can comment on or make changes to this bug.