问题
Basically, I have a huge amount of files and many of them contain polish letters like 'ł, ż, ź, ó, ń' etc. in their filename.
What I want to reach is somehow change this polish letter to standard ascii character. (So for example ż => z, ń => n).
The files are located on the server with Linux Debian Squeezee.
What should I use and how to achieve the final effect?
回答1:
You put a PHP tag to your question, so my answer will consider that.
There is a question similiar to yours.
Convert national chars into their latin equivalents in PHP
Basically
Use Normalizer PHP extension.
http://www.php.net/manual/en/class.normalizer.php
<?php
$string = 'ł ż ź ó ń';
echo Normalizer::normalize($string);
?>
来源:https://stackoverflow.com/questions/35942715/replace-polish-characteres-with-standard-ascii-equivalent