If the file name is wide char like Chinese, it's renamed to "pdf". information display like:
"For security reasons, your upload has been renamed to pdf.."
If the "Permitted upload file extensions" is set. The file can't be uploaded, and information display like:
"The selected file pdf. could not be uploaded. Only files with the following extensions are allowed: pdf."

Another question:
Should uuid be used for file names in the future?

Comments

dopry’s picture

Status: Active » Postponed (maintainer needs more info)

I need more information to help you with this issue...

Can you upload the original file or link to it somewhere so I can test it... Are you on windows or linux. I know for sure the php file functions for win32 do no support unicode. I'm not sure about linux, I think it may depend on how your system is set up... I'd love an update as i18n is an issue oft over looked in file handling.

.darrel.

shenzhuxi’s picture

I've fixed it.
In fact, it's due to Drupal core and Php default settings rather than FileField module.
In the unicode.inc file, "setlocale(LC_CTYPE, 'C')" is the the default setting. I fixed this problem by changing it into "setlocale(LC_CTYPE, 'en_US.UTF-8')".

quicksketch’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

You might also try using transliterate module, which can convert non-latin characters in filenames when saving on servers that do not support UTF-8 characters. Thanks for letting us know your solution.

mirian’s picture

Isn't it too general place to change that encoding definition?
I wonder if it may cause problems in other places...

I think , maybe there is a use of some PHP function that does not supportnon latin languages..
see the problem described here http://drupal.org/node/278425 regarding to "basename" in Drupal5 ...

Miriam

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.