Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-16824

Filenames with international characters are garbled in IE

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 4.3.0
    • None
    • Operating System:
      PHP Version: 5.3.2
      Database and version:
      Browser (and version): IE6-8

    Description

      This is from a customer issue. Files with international characters in the filename get their filename garbled when downloaded with Internet Explorer.

      This is caused by the filename supplied in the "Content-disposition" header being utf-8 encoded, which is not compatible with IE.

      When downloading a file the browser gets the (suggested) filename from the "Content-disposition" header sent from the server.

      As of today the "Content-disposition" header should only contain filenames encoded in iso8859-1. (Follow links from here: http://en.wikipedia.org/wiki/MIME#Content-Disposition). The standard may in fact still be US-ASCII, but all browsers support iso8859-1.

      eZ Publish supplies filenames in UTF-8 in the "Content-disposition" header. This is supported by atleast Firefox 3.6 and Chrome 4, but as yet not standards compliant.

      You can validate this for yourself by using a tool like Wireshark for capturing the traffic exchanged between the browser and the webserver. See the attached dump as well (note: the dump is in iso8859-1 encoding, one byte per char).

      To summarize, Internet Explorer's behavior is the correct one, because the "Content-disposition" filename should only be iso8859-1 encoded, not utf-8.

      Possible solutions could be to either convert all filenames output with "Content-dispostion" to iso8859-1, or only do this for IE as a special case.

      See also: http://greenbytes.de/tech/tc2231/ (some older test results different browser's feature support relevant to this issue).

      Steps to reproduce

      1. Get the attached file with internation characters in the filename.

      2. Upload the file to an eZ Publish site using the filename as "Name" in eZ Publish.

      3. Embed the file in an Article, Frontpage or similar.

      4. Try to download the file with IE8/7/6. The suggested filename is garbled, it does not represent the internation characters correctly.

      Attachments

        Activity

          People

            e8318ba6-e4ae-477c-9116-36c073bd11a3@accounts.ibexa.co Patrick Allaert
            lars.warholm lars.warholm
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: