基本上,我有大量文件,其中许多文件名中包含波兰字母(如'ł,ż,ź,ó,ń'等).
Basically, I have a huge amount of files and many of them contain polish letters like 'ł, ż, ź, ó, ń' etc. in their filename.
我想达到的目的是以某种方式将此波兰字母更改为标准ascii字符. (例如ż=> z,ń=> n).
What I want to reach is somehow change this polish letter to standard ascii character. (So for example ż => z, ń => n).
文件位于使用Linux Debian Squeezee的服务器上.
The files are located on the server with Linux Debian Squeezee.
我应该使用什么以及如何达到最终效果?
What should I use and how to achieve the final effect?
推荐答案您在问题中添加了PHP标记,因此我的回答将考虑这一点.
You put a PHP tag to your question, so my answer will consider that.
有一个与您相似的问题.
There is a question similiar to yours.
将国家字符转换为PHP中的拉丁字符
基本上
使用Normalizer PHP扩展名.
Basically
Use Normalizer PHP extension.
www.php/manual/zh/class .normalizer.php
<?php $string = 'ł ż ź ó ń'; echo Normalizer::normalize($string); ?>更多推荐
用标准的ascii替代波兰字符
发布评论