Opened 8 years ago

Closed 8 years ago

#2087 closed defect (fixed)

Uploading a file with national characters gives incorrect file name

Reported by: Nicklas Nordborg 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 by Nicklas Nordborg, 8 years ago

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 by Nicklas Nordborg, 8 years ago

Resolution: fixed
Status: newclosed

(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.