将特殊字符转换为普通字符

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将特殊字符转换为普通字符相关的知识,希望对你有一定的参考价值。

  1. $ts = array("/[À-Å]/","/Æ/","/Ç/","/[È-Ë]/","/[Ì-Ï]/","/Ð/","/Ñ/","/[Ò-ÖØ]/","/×/","/[Ù-Ü]/","/[Ý-ß]/","/[à-å]/","/æ/","/ç/","/[è-ë]/","/[ì-ï]/","/ð/","/ñ/","/[ò-öø]/","/÷/","/[ù-ü]/","/[ý-ÿ]/");
  2. $tn = array("A","AE","C","E","I","D","N","O","X","U","Y","a","ae","c","e","i","d","n","o","x","u","y");
  3. preg_replace($ts,$tn, $p);

以上是关于将特殊字符转换为普通字符的主要内容,如果未能解决你的问题,请参考以下文章

PHP怎么将HTML实体转换为普通字符

将特殊字符转换为 HTML 字符代码

数据字符串中具有分隔符/特殊字符的 Redshift 卸载命令

PHP 将特殊字符转换为正常

DOS 命令中怎样将一个特殊字符设置成普通符号

将特殊的土耳其字符转换为国际拉丁字符