When I try to upload a file that its name begins with a non-ascii character (for example, a hebrew character, like 'א', but it's the same for german), I get the message the filename is invalid.

This is cause by basename() php function not recognizing these characters and actually deleting them. This is a known bug in PHP that was recently fixed (http://bugs.php.net/bug.php?id=37945).

However, it is easy to workaround this, replacing basename with preg_replace, and changing another character replacement a few lines below.

CommentFileSizeAuthor
imce.patch1.18 KByhager
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ufku’s picture

Thanks for the patch. However, it doesnt seem to be a good idea to replace basename functions with alternatives through the script. There are 2(plus many that are invoked from the core) in 4.7 and much more in 5th version. Moreover, drupal core is full of these functions and i dont think they will replace all these with alternatives. I may reconsider this issue if any development occurs regarding the drupal core.

ufku’s picture

Status: Needs review » Closed (won't fix)

this wont fix.
solution: rename your files or upgrade your php application.