Ticket #4972 (closed Bug: duplicate)

Opened 6 years ago

Last modified 3 years ago

file download: filename not correctly encoded

Reported by: Anonymous User Owned by: hannosch
Priority: minor Milestone: 2.5.2
Component: Infrastructure Keywords:
Cc:

Description (last modified by wichert) (diff)

In Plone 2.11 when downloading a file (ATCTFile), the filename is not encoded correctly. This can lead to wrong filenames containing strange characters.

If the filename of a file contains non-ascii characters (e.g. german umlauts) a file with name <Bsp-öäü.bin> becomes >Bsp-öäü.bin> when saving in Internet Explorer. The bug also shwos up in Safari browser. Firefox seems to catch this issue and can interpret the string correctly.

Cause for this problem seems to be the missing encoding of the string for the filename that is set inside the method Products.Archetype.Field.download(). Here the filename should be encoded as described (e.g. in RFC 1806 ( http://www.faqs.org/rfcs/rfc1806.html) ).

Change History

comment:1 Changed 6 years ago by hannosch

  • Description modified (diff)
  • Milestone changed from 2.1.x to 2.1.3

comment:2 Changed 6 years ago by wichert

  • Description modified (diff)

comment:3 Changed 6 years ago by wichert

RFC 1806 isn't very helpful: it explicitly mentions the filename can only be us-ascii. I also note that RFC 1806 is experimental and thus might not be a very good text to base decisions on.

An interesting issue here is how to determine what the encoding of the filename is when it is created/uploaded.

comment:4 Changed 5 years ago by alecm

  • Owner changed from to hannosch

comment:5 Changed 5 years ago by hannosch

  • Status changed from new to closed
  • Resolution set to duplicate

This is an AT issue and already tracked at http://dev.plone.org/archetypes/ticket/620.

comment:6 Changed 5 years ago by hannosch

  • Milestone changed from 2.5.x to 2.5.2

Milestone 2.5.x deleted

comment:7 Changed 3 years ago by hannosch

  • Component changed from Content Types to Infrastructure
Note: See TracTickets for help on using tickets.