![]() |
1
14
|
![]() |
2
2
function strtr_utf8($str, $from, $to) { $keys = array(); $values = array(); if(!is_array($from)) { preg_match_all('/./u', $from, $keys); preg_match_all('/./u', $to, $values); $mapping = array_combine($keys[0], $values[0]); }else $mapping=$from; return strtr($str, $mapping); } 我稍微编辑了joefooker的函数,返回使用第二个参数作为数组替换_对的功能。 |
![]() |
3
-1
|
![]() |
M - · 为什么两个相同的表情符号不相等? 3 年前 |
![]() |
Mohsen · 将字符串从Windows 1256转换为UTF-8 7 年前 |
![]() |
AMINA ARSHAD · 从字符转换为Unicode数字时出错 7 年前 |
![]() |
Taqwa · 在C#[已关闭]中将上标转换为Unicode 7 年前 |