Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2006
    Posts
    123
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Scrambled encoding for uploads with unicode filenames

    Pretty much like the title reads...

    Files with unicode chars in the filename get scrambled when I try to upload them to the server...

    it seems like maybe the filename gets scrambled for multipart/form-data forms?

    either that or move_uploaded_file can't handle unicode??

    I really don't know the problem, but I would really love a solution!!

  • #2
    Regular Coder
    Join Date
    May 2008
    Location
    Ohio
    Posts
    231
    Thanks
    3
    Thanked 21 Times in 21 Posts
    What OS is the server running? Are there any files on the server with unicode names that can act as proof that it can work? How are you viewing the file names? An FTP client? Command line? Windows Explorer? If it's command line or FTP it's entirely possible that it's storing it properly but is not displaying it properly to your FTP/ssh client. For instance: I use PuTTY to connect to my server at home while I'm at work. Putty isn't set up for UTF-8 on this computer so when I view my files that have umlauts in them, it shows up as garbled characters (even though they are correct on the actual server) - it's just putty that's displaying it wrong.
    zok@zoklet:~$ whereis zok
    zok: http://zoklet.net | http://zoklet.net/otg | /derzok/at/gmail/dot/com

  • #3
    Regular Coder
    Join Date
    May 2006
    Posts
    123
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The OS should be able to handle it, I think because I can upload a file with a unicode name to the server, then download it again, and everything will be intact, filename and all...

    it's only after sending it by a form and using move_uploaded_file() that the filename becomes scrambled.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •