IDN rendering in URL bar

RESOLVED FIXED in mozilla1.3beta

Status

()

Core
Networking
RESOLVED FIXED
16 years ago
14 years ago

People

(Reporter: Wil Tan, Assigned: Wil Tan)

Tracking

({intl})

Trunk
mozilla1.3beta
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

16 years ago
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

16 years ago
Does the current DLL support decoding ACE? Can we add the decoding method to
nsIIDNService?
(Assignee)

Comment 2

16 years ago
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

16 years ago
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.
(Assignee)

Comment 4

16 years ago
Yes the library can decode ACE, so how about using the name 
nsIIDNService::IDNToUTF8HostName()?

Comment 5

16 years ago
Yes, I think that's fine.


*** Bug 120744 has been marked as a duplicate of this bug. ***

Updated

15 years ago
Blocks: 124042
(Assignee)

Comment 7

15 years ago
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

15 years ago
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.
(Assignee)

Comment 9

15 years ago
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.
Attachment #68263 - Attachment is obsolete: true

Comment 10

15 years ago
Comment on attachment 69164 [details]
new nsIIDNService.idl with changes suggested by Darin

looks good to me sr=darin
Attachment #69164 - Flags: superreview+

Comment 11

15 years ago
Comment on attachment 69164 [details]
new nsIIDNService.idl with changes suggested by Darin

r=nhotta
Attachment #69164 - Flags: review+
(Assignee)

Comment 12

15 years ago
Created attachment 70067 [details] [diff] [review]
search and replace occurances of old nsIIDNService method name

This includes the nsIIDNService.idl diffs.

Comment 13

15 years ago
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
:-)
Attachment #70067 - Flags: superreview+

Updated

15 years ago
Keywords: intl
QA Contact: benc → teruko
(Assignee)

Comment 14

15 years ago
Can this make it into 0.9.9?

Comment 15

15 years ago
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.
(Assignee)

Comment 16

15 years ago
Naoki, could you please r= attachment 70067 [details] [diff] [review]?
Thanks!

Comment 17

15 years ago
Comment on attachment 70067 [details] [diff] [review]
search and replace occurances of old nsIIDNService method name

r=nhotta
Attachment #70067 - Flags: review+

Comment 18

15 years ago
we should try to land this when the trunk opens for mozilla 1.0

nhotta: can you take care of landing this?
Keywords: mozilla1.0
Target Milestone: --- → mozilla1.0

Comment 19

15 years ago
okay

Updated

15 years ago
No longer blocks: 124042

Updated

15 years ago
Blocks: 124042
Comment on attachment 70067 [details] [diff] [review]
search and replace occurances of old nsIIDNService method name

a=shaver for the 1.0 trunk.
Attachment #70067 - Flags: approval+

Updated

15 years ago
No longer blocks: 124042

Comment 21

15 years ago
checked in to the trunk
(Assignee)

Comment 22

15 years ago
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

15 years ago
william: i think that patch belongs in another bug, but if nhotta asked to have
it here, then no problem... sr=darin.

Comment 24

15 years ago
Comment on attachment 73604 [details] [diff] [review]
Turn on network.enableIDN by default.

sr=darin
Attachment #73604 - Flags: superreview+

Comment 25

15 years ago
Comment on attachment 73604 [details] [diff] [review]
Turn on network.enableIDN by default.

r=nhotta
Attachment #73604 - Flags: review+

Comment 26

15 years ago
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
Attachment #73604 - Flags: approval+

Comment 27

15 years ago
checked in to the trunk

Comment 28

15 years ago
Comment on attachment 70067 [details] [diff] [review]
search and replace occurances of old nsIIDNService method name

obsoleting checked in patches.
Attachment #70067 - Attachment is obsolete: true

Comment 29

15 years ago
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.
Attachment #73604 - Attachment is obsolete: true

Comment 30

14 years ago
Shouldn't this bug be closed ?

Comment 31

14 years ago
yes, this is fixed now
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED
Target Milestone: mozilla1.0 → mozilla1.3beta
You need to log in before you can comment on or make changes to this bug.