Hello Ortwin,
> I haven't tried myself. What happens when you send the form blow with
> a browser? Does it set the Content-Encoding header of the HTTP message
> to UTF-8? Because the server must have a way to know in which encoding
> to interprete the MIME header if it's not the default ASCII.
Browsers I've checked (IE6, Firefox 1.5, Opera 7.54) are not sending a
Content-Encoding header. IE6 and Firefox encode the filename properly
and Opera corrupts it by removing all non-ASCII characters.
The request looks like this (from IE6):
POST / HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: pl
Content-Type: multipart/form-data;
boundary=---------------------------7d63a8a70774
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1;
EmbeddedWB 14,52 from: http://www.bsalsa.com/ EmbeddedWB 14,52; .NET CLR
1.1.4322; .NET CLR 2.0.50727)
Host: ipppub02.desy.de:1235
Content-Length: 262
Connection: Keep-Alive
Cache-Control: no-cache
-----------------------------7d63a8a70774
Content-Disposition: form-data; name="file";
filename="C:\Desy2\^°!²§³$% & { ( [ ) ] = } [EMAIL PROTECTED] Ü +~ ö
ÖäÄ'#µ,;.-_.TXT"
Content-Type: text/plain
bla
bla
bla
-----------------------------7d63a8a70774--
The weird looking filename is my test bunch of special characters
Windows allowed me to use in a filename - and it's in UTF-8 (what might
not be obvious from the listing above).
I guess a Content-Encoding header would appear if I added an appropriate
META tag in my HTML (I'm only using accept-charset attribute in the
FORM tag currently), but it seems to work without it - FileUpload
interprets this filename properly without any hints on the encoding
(perhaps it's just using UTF-8 as default?).
Hope this helps,
--Przemek
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]