Foreign characters in file name trigger warning message (keeping state demo)

Last post 12-17-2011, 5:49 PM by jrlemay. 1 replies.
Sort Posts: Previous Next
  •  12-17-2011, 3:27 PM 72064

    Foreign characters in file name trigger warning message (keeping state demo)

    Hi,
    When I try to upload a file with a foreign character in the file name. I get a warning. The file is uploaded (the guid name got modified) but the uploader can not get the file.size and trigger a warning :
     
    Warning: filesize() [function.filesize]: stat failed for /tmp/uploadertemp/persisted.a6135e31-f2aa-48bd-be90-cd1f5efd10d0.Iconic Légo.jpg.resx in /home/adamwang/public_html/phpfileuploader.com/demo/phpuploader/include_phpuploader.php on line 775
    Iconic Légo.jpg
       
    the windows original filename is Iconic Légo.jpg
     
    Any idea?
     
    thanks
    Filed under:
  •  12-17-2011, 5:49 PM 72066 in reply to 72064

    Re: Foreign characters in file name trigger warning message (keeping state demo)

    I found something in an older thread
     
    changing
    $PhpUploader_FSEncoding="ISO-8859-1//TRANSLIT";
    for
    $PhpUploader_FSEncoding="ISO-8859-6//TRANSLIT";
    in the very first line of the file include_phpuploader.php
    does the trick.
     
    Changing for
    $PhpUploader_FSEncoding="utf-8";
    seems to work too. Is there any harm to use this more universal encoding?
     
    many thanks
View as RSS news feed in XML