Closed Bug 163682 Opened 23 years ago Closed 23 years ago

FTP download: non-ascii filename is not shown correctly via "Save Link Target As"

Categories

(Core :: Internationalization, defect, P1)

x86
Windows XP
defect

Tracking

()

VERIFIED FIXED
mozilla1.0.2

People

(Reporter: ji, Assigned: nhottanscp)

References

Details

(Keywords: intl, topembed+, Whiteboard: [adt2] [ETA 09/10])

Attachments

(2 files, 1 obsolete file)

This is seperated from bug 162377. Steps to reproduce: 1. go to ftp://10.169.114.243 2. Go to Edit | Preference | Language, select Simplified Chinese (GB2312) as Character Encoding, so the Chinese filenames can be viewed correctly on thelisting page. 3. Shift click on the html/text file with Chinese filename or right click on the file and select Save Link Target As menu, the Chinese filename is always shown as "File" on Save as dialog. 4. To compare with the result of an English filename, on the same page, click on "English" folder, Shift click on an English html/text file, you can see the English filename is shown correctly on Sava as dialog
Keywords: intl
Is this a Mozilla browser issue only, or will embeddor see the same "Save as dialog?" IF embeddors will see this problem, pls nominate as topembed. thanks!
Blocks: 154896
Severity: normal → major
Keywords: nsbeta1+
Priority: -- → P1
Whiteboard: [adt2 RTM] [ETA Needed]
Target Milestone: --- → mozilla1.0.2
Embeddor also has a context menu of "Save Link Target As". Nominating.
Severity: major → normal
Keywords: nsbeta1+topembed
Priority: P1 → --
Target Milestone: mozilla1.0.2 → ---
Severity: normal → major
Keywords: topembednsbeta1+
Priority: -- → P1
QA Contact: ruixu → ji
Target Milestone: --- → mozilla1.0.2
Keywords: topembed
Keywords: topembed
Keywords: topembed
Restore bug status which are changed wrong.
Severity: major → normal
Keywords: nsbeta1+
Priority: P1 → --
Target Milestone: mozilla1.0.2 → ---
Bug status was not changed. The field changes were Priority, Severity, Target Milestone and the keyword nsbeta1+. Pls Note: nsbeta1+ indicated to development that this is a good bug to work on, Mozilla1.0.2 is the milestone in which PjM along with development believes the bug will be resolved [as Mozilla1.0.1 will be final tomorrow], Severity was not changed from its default and is probably not "normal" as this would be needed by a major embeddor (but, it is a QA field, so i will leave @ "normal" and ask that ji upgrade it to "major"), and last P1, because it is the #1 thing nhotta should be working on this week.
Keywords: nsbeta1+
Priority: -- → P1
Target Milestone: --- → mozilla1.0.2
JPG/BMP files have the same problem, modified the summary accordingly.
Severity: normal → major
Summary: Non-ascii html/text filename is not shown correctly when saving from a ftp listing → FTP download: non-ascii filename is not shown correctly via "Save Link Target As"
Did more testing, actually download via Save Link Target As menu has problems with all different file types: .exe/.doc/.html/.txt/.jpg/.bmp/.gif
Status: NEW → ASSIGNED
There are functions in contentAreaUtils.js which seems to handle file names. 642 function getDefaultFileName(aDefaultFileName, aNameFromHeaders, aDocumentURI, aDocument) http://lxr.mozilla.org/seamonkey/source/xpfe/communicator/resources/content/contentAreaUtils.js#642 689 function validateFileName(aFileName) http://lxr.mozilla.org/seamonkey/source/xpfe/communicator/resources/content/contentAreaUtils.js#689 cc to bzbarsky, I need to talk to him to get some info.
This is a dup of bug 161242
Depends on: 161242
Comment on attachment 97705 [details] [diff] [review] Add a code to unescape with a charset for a non ASCII file name. Nice! I forgot all about window._content... sr=bzbarsky
Attachment #97705 - Flags: superreview+
Comment on attachment 97705 [details] [diff] [review] Add a code to unescape with a charset for a non ASCII file name. r=jbetak Naoki, I believe the fallback will return the charset of the top frame (top content window). + charset = window._content.document.characterSet Since aDocument should contain the currently focused frame as you have pointed out, this scenario is unlikely to occur. The top frame might be a good enough fall-back for FTP sites, since they are not known for using multiple charsets on one page. I didn't want to complicate things, just document my understanding of what this code really does in case we would ever need to revisit it.
Attachment #97705 - Flags: review+
> Since aDocument should contain the currently focused frame aDocument is only set when doing "save page as" or "save frame as". "save link target as", shift-click, etc (what this bug is concerned with) will always have a null aDocument.
Do we want "document.commandDispatcher.focusedWindow" instead of "window._content" then?
Hmm... that would be a good idea, I think.
This is needed by a major embeddor. Marking as Topembed+ per Valeski.
Whiteboard: [adt2 RTM] [ETA Needed] → [adt2] [ETA 09/09]
Attachment #97705 - Attachment is obsolete: true
Comment on attachment 97964 [details] [diff] [review] Changed to prefer focusedWindow over window._content. r=jbetak bz, we've seen cases where document.commandDispatcher.focusedWindow == null, see bug 60406 (relates to some sidebar trickery)
Attachment #97964 - Flags: review+
Comment on attachment 97964 [details] [diff] [review] Changed to prefer focusedWindow over window._content. sr=bzbarsky
Attachment #97964 - Flags: superreview+
Keywords: approval, edt1.0.2
Comment on attachment 97964 [details] [diff] [review] Changed to prefer focusedWindow over window._content. a=rjesup@wgate.com
Attachment #97964 - Flags: approval+
checked in to the trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
ji: can you pls verify this as fixed in the next trunk build? thanks!
Whiteboard: [adt2] [ETA 09/09] → [adt2] [ETA 09/10]
Verified as fixed on 2002-09-09-04-trunk build.
Status: RESOLVED → VERIFIED
Comment on attachment 98454 [details] [diff] [review] Resolved conflicts for 1.0 branch. Carrying over r/sr from trunk patch. a=rjesup@wgate.com for 1.0 branch checkin. Please change mozilla1.0.2+ to fixed1.0.2 when checked in.
Attachment #98454 - Flags: superreview+
Attachment #98454 - Flags: review+
Attachment #98454 - Flags: approval+
Keywords: edt1.0.2edt1.0.2+
Marking as "mozilla1.0.2+" per Comment #24 From Randell Jesup.
Keywords: edt1.0.2edt1.0.2+
checked in to 1.0 branch
Verified as fixed on 09/12 1.0.2 branch build.
No longer depends on: 161242
*** Bug 161242 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: