I was facing the same issue. My guess is if the file is uploaded from Mac OS, the special characters are encoded in some proprietary Mac encoding – in my client’s case it was probably the Macintosh Central European encoding. In such case the current plugin’s replacement method will not work properly.
I found the following solution.
Change:
$friendly_filename = preg_replace( array_keys( $chars_table ), array_values( $chars_table ), $filename );
return strtolower( $friendly_filename );
To:
$friendly_filename = preg_replace( array_keys( $chars_table ), array_values( $chars_table ), $filename );
$transliterate_filename = transliterator_transliterate(‘Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove’, $friendly_filename);
return strtolower( $transliterate_filename );
@webvitaly In case you’d like to list me as a contributor, I’d be grateful:)