Closed Bug 153640 Opened 22 years ago Closed 16 years ago

URL in ISO-2022-JP isn't escaped correctly

Categories

(Core :: Internationalization, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
mozilla1.9alpha1

People

(Reporter: kazhik, Assigned: masayuki)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: intl)

URL in ISO-2022-JP isn't escaped correctly.

http://wazilla.sourceforge.jp/

Click "ニュース" in this page. 2002062110-trunk/Linux escape the URL
as follows.

http://wazilla.sourceforge.jp/#%1B$B%K%e!%3C%9%1B(B


Original report in Bugzilla-jp:
http://bugzilla.mozilla.gr.jp/show_bug.cgi?id=2337
Keywords: intl
QA Contact: ruixu → kasumi
->nhotta.  He worked on this
Assignee: yokoyama → nhotta
I have not checked RFC 2396, but I think we can leave characters unescaped if
they are not needed to be escaped.
Status: NEW → ASSIGNED
*** Bug 160908 has been marked as a duplicate of this bug. ***

*** This bug has been marked as a duplicate of 160908 ***
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
verified
Status: RESOLVED → VERIFIED
If bug 160908 is a duplicate of bug 153640, bug 153640 can't be a duplicate of
bug 160908.
Status: VERIFIED → REOPENED
Resolution: DUPLICATE → ---
WFM with 2002123008-trunk/WinXP.
Koike Kazuhiko, is this still an issue on Linux?  The original steps to
reproduce no longer work (that text is not a link on http://wazilla.sourceforge.jp/)
The text *is* actually a link on the page, comment #0 just gives the text in
Shift_JIS (probably the reporter's system charset), and the page is in
ISO-2022-JP (and is declared as such, so it displays as Japanese text
automatically). The link is the leftmost one in the line centered underneath the
top heading banner. If you view this bug page as Shift_JIS you can see the
Japanese appearance of the text in comment #0.

That said, the link WFM on WinXP with Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4
That escaping of the link isn't recognized by IE though, so I suppose there
could be an issue where we're escaping the link in a way that's internally
consistent so that it works in Firefox, but the escaping is wrong from the
perspective of some external standard. I have no idea how ISO-2022-JP anchor
escaping is supposed to work so I can't say.
Assignee: nhottanscp → masayuki
Status: REOPENED → NEW
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
Status: NEW → ASSIGNED
Blocks: 316730
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9pre) Gecko/2008041001 SeaMonkey/2.0a1pre

That link is now escaped as http://wazilla.sourceforge.jp/#%E3%83%8B%E3%83%A5%E3%83%BC%E3%82%B9 with four Unicode codepoints represented each by 3 bytes in UTF-8; that UTF-8 means ニュース which is correct. I checked the page source and the href value is still in iso-2022-jp.

Marking WORKSFORME. If it doesn't work for you on a current build of Firefox 3 or SeaMonkey 2, please paste your user-agent string (from e.g. the about: page) at the top of your comment, as I did here.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago16 years ago
Resolution: --- → WORKSFORME
This needs a test.
Flags: in-testsuite?
No, this is not actually fixed. The anchor string in ISO-2022-JP document is still escaped (but not broken). They should be displayed as decoded string.

And we still have |nsTextToSubURI::UnEscapeURIForUI|. That cannot process the complex URI that has two (or more) encodings.

http://lxr.mozilla.org/mozilla/source/intl/uconv/src/nsTextToSubURI.cpp

I think that the current statusbar is not using that. So, I think I should file 2 new bugs for the statusbar display and |nsTextToSubURI::UnEscapeURIForUI| cleaning up (or remove it).
(In reply to comment #13)
[...]
> I think that the current statusbar is not using that. So, I think I should file
> 2 new bugs for the statusbar display and |nsTextToSubURI::UnEscapeURIForUI|
> cleaning up (or remove it).
> 

I think I saw something like that by walking the blocked/blocking bugs starting at this one, but it took me some time; there ought to be a better way to get there.
You need to log in before you can comment on or make changes to this bug.