Closed Bug 165585 Opened 23 years ago Closed 23 years ago

[TRUNK] FTP listing is not working properly for native filename, unable to download

Categories

(Core :: Internationalization, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: ji, Assigned: dougt)

Details

(Keywords: intl, regression)

Attachments

(2 files)

FTP listing used to be working for native filename as long as browser default charset matches with server's locale. Now it's broken in the trunk since 2002-08-29-04-trunk build Steps to reproduce: 1. go to ftp://10.169.114.243, this testing server is now running on Simplified Chinese XP, the listing page contains several files with Chinese filename. 2. Set brower's default charset to gb2312 via Edit | Preferences | Navigator | Languages you can see the listing page doesn't list the chinese filename at all. It used to be working before. 3. Change the default charset setting to gb18030, the Chinese filename is listed, then click on one .exe file, it can't be downloaded, giving out an error message indicating that the file doesn't exist, which is not true.
Keywords: intl, nsbeta1, regression
This is caused by bug 95590. I reverted the files before the change of bug 95590 and that fixed the problem.
so is this fixed?
this is my bug.
Assignee: yokoyama → dougt
this is strange. I can browse that site without any problem in my build. Auto Detect is off. Could there be any other change which you have made which caused this to break?
In my case, auto detect is also turned off. Can you click and download the file with the filename beginning with "icq"?
>I can browse that site without any problem in my build. The site has 12 files/directories. I can only see three directories which are ASCII only, cannot see non ASCII files/directories.
I see. you have to go into perferences and change the charset there.
QA contact to myself.
QA Contact: ruixu → ji
turns out that this regression was not caused by my changes, but as a result of this checking: date: 2002/05/22 00:00:37; author: yokoyama%netscape.com; state: Exp; lines: +16 -4 bug 118179 FTP site is broken for Japanese server Impact for only displaying ftp directory listing. /r=bbaetz,/sr=darin,/a=chofmann,/adt=putterman Backing out this file: mozilla/netwerk/streamconv/converters/nsDirIndexParser.cpp Fixes the problem. Not that this bustage probably occurs on the BRANCH!
That change is needed for the listing page to use the pref default charset instead of always "ISO-8859-1". Without that change, the user always has to set the charset by menu in order to see it right. We need to figure out why that change does not work well with the change of bug 95590 and find a solution.
(why did bug 118179 end up as INVALID instead of FIXED???) Anyway, doug, the 'new' code probably needs to translate the filename through nsITextTOSuburi - I _think_ thats what the old code did, although there were/are so many layers of indirection that I'n not sure about that. The basic problem here is that FTP was not designed to handle anything apart from 7-bit-ASCII. The support we have for trying to work arround this is incredibly fragile because the ftp spec gives us no other way to handle it....
Attached patch Fixes problemSplinter Review
You are right. All we have to do is make sure that the filename is properly encoded. I think that this code be cleaned up alot (cache the encoding, or better yet make the location a wide string....) Can someone verify this patch?
I think the patch fixed the problem. I can see the Chinese ftp listing correctly when I set the browser's default to GB2311. Let me switch my system to Chinese to verify if I can really download the files.
With setting my default system charset to Simplified Chinese, I can download the Chinese named files in ftp://10.169.114.243 if I applied the patch.
Comment on attachment 97357 [details] [diff] [review] Fixes problem r=nhotta
Attachment #97357 - Flags: review+
Comment on attachment 97357 [details] [diff] [review] Fixes problem sr=darin
Attachment #97357 - Flags: superreview+
Fixed
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified as fixed on 09/06 trunk build.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: