用iconv php从windows-1256转换为utf8

时间:2014-10-13 07:46:44

标签: type-conversion iconv

我想查看字符串是否会从windows-1256转换为utf-8,因为它会将其保存在数据库中,但结果不正确

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Title of the document</title>
</head>

<body>
<?php
$text="ÇáÇäÊãÇÁ";
$utf8 = iconv('windows-1256', 'UTF-8//TRANSLIT', $text);
echo $utf8;
?></body>

</html>

0 个答案:

没有答案