Fix #1850: Cannot upload attachments if the filename contains only non-L...

...atin characters