Closed Fasse closed 5 years ago
@ximex can you look at this. Think this is a regression of some conversions.
@Fasse found the problem
Commit: https://github.com/Admidio/admidio/commit/8e8c8d1664636b229e219c0e959d97fa5c667708
It's the basename function that doesn't support special chars. The strange thing is: if i run a test-script like $ php test.php
it works.
Maybe this is a solution:
https://secure.php.net/manual/de/function.basename.php#85369
@ximex can you have a look at this. For test reasons I remove the basename completely but I still geht the umlauts error. Maybe there is something wrong with the regex.
@Fasse I couldn't reproduce it. What PHP Version? Do you have the mb string extension installed? Couldn't you add some Logging so you could find the exact position of the error?
you can reproduce this on the playground (PHP 5.5).
There I have removed the basename within the string.php and want to upload a häuser.txt. I still get the error.
@Ximex can You Look at it. Otherwise I will restore the old behavior.
@Fasse i tested it in the playground and it works... look at the uploaded häuser.txt file. maybe its a browser problem? I tested with Firefox and Chrome
Interesting, it's a browser problem.
Firefox 51 and maybe prior version on Mac wont work. Safari work. Chrome on Mac wont work.
:(
https://github.com/contao/core/issues/5501 other have this problem too.
Could you add a logging here: https://github.com/Admidio/admidio/blob/3cd9e560ecc24a0b5ea2f0949e4b963f2ef22459/adm_program/system/string.php#L249 Logging of $filename is enough. Please share the result. maybe i find a solution
hmm, the name in the logfile is exact the correct one with umlauts.
Very strange.
Some FTP-programs and browsers has this problem unless using binary transfer. I have a FTP-program that won't let me upload files with any of the Danish national characters (æøå) My opinion : Filenames should be without special characters - you beg for trouble. Just for information.
@JMS-S But Unix and Windows allow all national characters within the filename, so we should also allow them.
This was possible in prior versions.
äüöß -> you got the following error