Page 1 of 1

PHP FTP_GET - Can't handle special characters

Posted: Mon Mar 15, 2010 5:21 am
by koolsamule
Hi Chaps,

I have a PHP FTP app where users can up/download files.

Our company deals with foreign languages, so some of the files may have special characters, such as (German) umlauts. Uploading files with umlauts seems fine, but when I download a file, it goes from:
Häuse.pdf
to
Häuse.pdf
Is there any way to get round this, so it keeps the correct file name?

Cheers

Re: PHP FTP_GET - Can't handle special characters

Posted: Mon Mar 15, 2010 2:32 pm
by tr0gd0rr
Looks like the file path is stored in a charset that doesn't have the umlaut a. You should make your database field UTF-8.

Then, when you display or link to the URL, you need to use rawurlencode because the umlaut a and other characters must be encoded in the URL string.