Closed Bug 263850 Opened 20 years ago Closed 20 years ago

when downloading an attachment with a charcter encoded in utf-8, the filename parameter is ignored

Categories

(SeaMonkey :: General, defect)

x86
Windows XP
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: hauser, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041008
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041008

my tomcat sends
response.addHeader("Content-Disposition",
                        "attachment;filename=file_fürDich.rtf" ); //this utf-8
encoded
and mozilla is in trouble:
- the filename is ignored and the file is saved with the URL that called the
struts-action.

(MSIE handles that correctly)

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Filenames that are not ASCII can't be just stuck in like that.  You have to say
what encoding they're in, per the relevant RFC.  IE fails at this in general,
for encodings other than UTF-8 and ISO-8859-1.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
thx for the hint.
Adding "; charset=\"UTF-8\"" did help for Mozilla,

but then MSIE would refuse to download.

converting the filenamestring back to iso-8859-1 and adding the charset
attribute now MSIE had troubles

so, I am back to converting my file-names to 7 Bit

As a side note: when testing that, twice nightly builds would no longer be able
to download files also from other websites after encountering utf-8 without the
charset attribute. Reinstalling mozilla solved this. It may, however be that
this was an issue of those recent nightly builds unrelated to this issue here.
> Adding "; charset=\"UTF-8\"" did help for Mozilla,

I don't recall this being the right way to specify the encoding of a _header_. 
It works because we fall back on the encoding of the entity when the headers
don't specify encoding....
I did try the '=?UTF-8?Q?filename...' approach too and it did not really work...
related might be Bug 56908 for eml files
Please, give me a couple of URLs where you have this problem (one for comment #0
and the other for comment #4). Just using raw UTF-8 should work with Mozilla. So
does 'RFC-2047'-encoding although it's RFC 2231 that you really have to refer to
in C-D filename parameter.  

Bug 56908 is not related to this bug.
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.