[SOLVED] german umlauts handling...
Posted: Sat Apr 16, 2011 6:29 pm
i am already running some installations of the "old" file hosting script.
a problem is handling from german umlauts like ä, ö, Ü and so on.
There is a way to handle them (i wrote this for the old file host):
with this addition i solved all user problems with uploading files with german umlauts and then not showing then...
my problem.
If i use your great script, i have to insert the replacement in the existing section in the file upload.php.
if found that the section:
is only active when uploading via html form.
when i upload via flash, then this does not work.
is there a way to handle this replacement table at flash uploading too?
a problem is handling from german umlauts like ä, ö, Ü and so on.
There is a way to handle them (i wrote this for the old file host):
- Code: Select all
//Filename Cleanup
$file_name = utf8_decode($file_name);
$replace_characters = array(
'&' => '_und_',
'Ä' => 'Ae',
'Ö' => 'Oe',
'ä' => 'ae',
'è' => 'e',
'é' => 'e',
'ö' => 'oe',
'ü' => 'ue',
'Ü' => 'Ue',
'ß' => 'ss',
' ' => '_',
'€' => 'EUR',
);
$file003 = strtr($file_name, $replace_characters);
// alle anderen Zeichen verwerfen
$file_name = preg_replace('#[^a-zA-Z0-9_.-]#', '-', $file003);
//Filename Cleanup ENDED
with this addition i solved all user problems with uploading files with german umlauts and then not showing then...
my problem.
If i use your great script, i have to insert the replacement in the existing section in the file upload.php.
if found that the section:
- Code: Select all
$filename = $_FILES['upfile']['name'];
$filename = str_replace("'",'',"$filename");
$filename = str_replace("&",'_',"$filename");
$filename = str_replace("!",'_',"$filename");
$filename = str_replace("@",'_',"$filename");
$filename = str_replace("#",'_',"$filename");
$filename = str_replace("$",'_',"$filename");
$filename = str_replace("%",'_',"$filename");
$filename = str_replace("^",'_',"$filename");
$filename = str_replace("*",'_',"$filename");
$filename = str_replace("(",'_',"$filename");
$filename = str_replace(")",'_',"$filename");
$filename = str_replace("-",'_',"$filename");
$filename = str_replace("+",'_',"$filename");
$filename = str_replace("=",'_',"$filename");
$filename = str_replace("|",'_',"$filename");
$filename = str_replace(" ",'',"$filename");
is only active when uploading via html form.
when i upload via flash, then this does not work.
is there a way to handle this replacement table at flash uploading too?