Difference between ContentDispositionHeaderValue.FileName and ContentDispositionHeaderValue.FileNameStar

We have a .Net web application in which the user can upload files. The file name that files may have may contain Danish characters æ, ø, and å, and possibly some other characters from some foreigh language.

We use the HttpResponseMessage class to send a file in which the ContentDispositionHeaderValue is initialized as an "attachment".

However appointment

FileName 

property does not work in IE for Danish characters, but works if I assign a file name

FileNameStar

where the file name is automatically encoded in the desired format.

So this works:

Content.Headers.ContentDisposition = new ContentDispositionHeaderValue("attachment")
{
    FileNameStar = "filename with æ ø and å"
};

However, I cannot find any documentation as to why it is automatically encoded, and which browsers support this feature.

, FileNamestar. , http, .

? , ?

+4
1

:

FileNameStar IETF RFC 5987. FileName FileNameStar , FileNameStar , IETF RFC 5987, , ISO-8859-1.

+3

Source: https://habr.com/ru/post/1661246/


All Articles