Opened 6 months ago

Closed 6 months ago

#2087 closed defect (fixed)

Uploading a file with national characters gives incorrect file name

Reported by: nicklas Owned by: everyone
Priority: minor Milestone: BASE 3.11.1
Component: web Version:
Keywords: Cc:

Description

For example, if the file name contains an ö it will be changed to ö and ä is changed to ä.

It is possible to fix the file name manually after the upload. Seems to happen in both Firefox and IE so I guess the issue is somewhere within the file upload servlet

Change History (2)

comment:1 Changed 6 months ago by nicklas

It seems like the browser is submitting the file names encoded in UTF-8, but there is no header indicating that it is doing that. The same problem is present in the other form fields as well (easy to test by entering a 'Description'). I think the places that call new String(...) should specify an encoding and that we should use UTF-8 unless the browser has set something else in the request header.

comment:2 Changed 6 months ago by nicklas

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

(In [7382]) Fixes #2087: Uploading a file with national characters gives incorrect file name

The file upload servlet now uses a character set when creating strings from the upload data. If the browser sets the encoding in the header that is used, otherwise we assume it is UTF-8.

Note: See TracTickets for help on using tickets.