Why am I getting Garbled international characters in the name when opening streamed file in IE?

Hi Folks!

Here’s another IE behavior that we thought you might find interesting…


IE makes a request and receives an HTTP response with the "Content-Disposition: attachment" header specifying a filename that includes non-ascii characters. For example, using %XX to encode UTF-8 representations of a Japanese filename. The client has checked "Always send URLs in UTF-8," so the filename is displayed properly, and properly saved if you choose to save it. However, If you choose to Open the file (for example, opening a .csv file in Excel), the filename that Excel uses contains the garbled (%XX) representation of the characters. 

But why?!

In this scenario, the application IE uses to Open the file (in this case, Excel) actually opens the cached file that IE creates when downloading the HTTP response. When IE creates the cached file, if there is a Content-Disposition header and the filename parameter is used, IE simply uses the text from the HTTP header to set the cache filename.  So while it may seem like bad behavior, it’s actually by design!


The IE Support Team

Comments (1)
  1. Samir Vaidya says:

    This is definitely a bug, and should not be "by design". When the browser shows the filename in Save As dialog, as well as the file download dialog, then why should it be different when file is directly "Open"ed.

    IE must implement RFC2231 for filename encoding, for better standards compliance and proper implementation of Content-Disposition header.

    Firefox handles this correctly.

Comments are closed.

Skip to main content