本文介绍了PHP音译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有将所有外来字符转换为A-z等价物的解决方案?我在Google上进行了广泛的搜索,找不到解决方案,甚至找不到字符和等效项的列表.原因是我只想显示A-z的网址,以及处理这些字符时出现的许多其他问题.
Are there any solutions that will convert all foreign characters to A-z equivalents? I have searched extensively on Google and could not find a solution or even a list of characters and equivalents. The reason is I want to display A-z only URLs, plus plenty of other trip ups when dealing with these characters.
推荐答案
您可以使用 iconv ,具有特殊的音译编码.
You can use iconv, which has a special transliteration encoding.
- http://www.gnu.org/软件/libiconv/documentation/libiconv/iconv_open.3.html
请参见此处以获取与您的用例相匹配的完整示例.
See here for a complete example that matches your use case.
这篇关于PHP音译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!