Issue 417: Fix bug when trying to upload a file with non-ascii characters