Closed
Bug 943284
Opened 11 years ago
Closed 7 years ago
nsIndexedToHTML should not try to support non-UTF-8 file: URLs
Categories
(Core :: Networking, defect, P5)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: hsivonen, Assigned: m_kato)
References
Details
(Whiteboard: [necko-would-take])
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
emk
:
review+
|
Details | Diff | Splinter Review |
It appears that we no longer support non-Unicode file systems anyway, so nsIndexedToHTML should stop using nsIPlatformCharset so that we might get rid of it.
Comment 1•11 years ago
|
||
Unfortunately nsIndexedToHTML is also used for FTP directory listings.
That said, we could always convert the output using UTF-8, I guess. Character Encoding menu is already broken for directory listings.
Comment 2•11 years ago
|
||
To make the output UTF-8, we need to %-encode URLs in the listing to prevent mis-conversion.
Depends on: 942791
Comment 3•11 years ago
|
||
Actually we still support non-UTF8 encoded file URL for backward compatibility on Windows.
https://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsURLHelperWin.cpp?rev=3d9424eb6eb4#99
Chrome also support this. IE doesn't unescape to parse file URLs.
Reporter | ||
Comment 4•11 years ago
|
||
(In reply to Masatoshi Kimura [:emk] from comment #3)
> Actually we still support non-UTF8 encoded file URL for backward
> compatibility on Windows.
> https://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/
> nsURLHelperWin.cpp?rev=3d9424eb6eb4#99
Does the nsIFile implementation use a legacy Windows API in that case directly, or does that stuff go through nsIPlatformCharset?
Comment 5•11 years ago
|
||
(In reply to Henri Sivonen (:hsivonen) from comment #4)
> Does the nsIFile implementation use a legacy Windows API in that case
> directly, or does that stuff go through nsIPlatformCharset?
nsLocalFileWin::InitWithNativePath will convert the path with NS_CopyNativeToUnicode(). So we could replace nsIPlatformCharset with NS_CopyNativeToUnicode.
Comment 6•11 years ago
|
||
And don't forget about non-UTF-8 query part. Maybe replaceable with mozilla::Encoding::FallbackEncoding.
Updated•9 years ago
|
Whiteboard: [necko-would-take]
Assignee | ||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P5
Comment 9•7 years ago
|
||
:m_kato, do you know if you'll be able to finish it in 58?
Flags: needinfo?(m_kato)
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → m_kato
Flags: needinfo?(m_kato)
Assignee | ||
Comment 10•7 years ago
|
||
Since default encoding of Android and macOS is UTF-8, it doesn't need to retry using platform encoding.
Attachment #8895295 -
Attachment is obsolete: true
Attachment #8919674 -
Flags: review?(VYV03354)
Updated•7 years ago
|
Attachment #8919674 -
Flags: review?(VYV03354) → review+
Comment 11•7 years ago
|
||
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f32554cf5530
Use FallbackEncoding instead of nsIPlatformCharset r=emk
Comment 12•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•