Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

special characters in filename.
  • I think the same thing for words in Portuguese?

    In my case, my files contain special characters, words in Portuguese, like this:
    é.doc
    , and when it is sent, arrives as
    é.doc


    How do I fix this?

    Thanks for help!

    Bruno
  • I am using ColdFusion 8 on Linux, however, a regular upload, without using the Uploadify, has no problems with special characters.

    Bruno
  • (I'm French)
    Use the html_entity_decode and htmlentities php functions.
    In the script, insert a line of code at the beginning like this :


    ...
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
    // insert the follow line
    $targetFile=html_entity_decode(htmlentities($_FILES['Filedata']['name'], ENT_QUOTES, 'UTF-8'));
    // change $_FILES['Filedata']['name'] by $targetFile in the follow line
    $targetFile = str_replace('//','/',$targetPath) . $targetFile;
    ...
  • (I'm Bulgarian, so I use Cyrillic alphabetic and v.2.1.4 of uploadify).
    To upload files that contain cyrillic charachers I have to use ......
    $tempFile =$_FILES['Filedata']['tmp_name'];
    $targetFile = iconv("UTF-8","WINDOWS-1251",$_FILES['Filedata']['name']);
    $targetFile = str_replace('//','/',$targetPath) . $targetFile;
    move_uploaded_file($tempFile,$targetFile);
    ......
    in my uploadify.php.
    If you use other charachters like: "ASCII", "Windows-1252", "ISO-8859-15", "ISO-8859-1", "ISO-8859-6", "CP1256", you can change "WINDOWS-1251" with one of them.

    I also go to my.ini file, because I use Apache server in xampp\mysql folder under Windows. There I add: # The MySQL server
    [mysqld]
    character-set-server=utf8
    collation-server=utf8_general_ci


    After you have to reset appache server or restart PC.
  • I am also curious about that.


    mbt shoes online store
  • Thank You Webmaxter, worked perfectly for me