【发布时间】:2017-07-14 05:42:22
【问题描述】:
我有一个问题,我无法将我的字符串从 CP1252 转换为 UTF-8,我的字符串来自我的 PHP 函数读取的 .DBF (Windows) 文件
- 我的应用程序完全采用 UTF8 编码
我的文件 .dbf 加载了 php-xbase
$table = new Table($file, null, "Windows-1252//TRANSLIT");
或
$table = new Table($file);
我的字符串返回不起作用:
Ordures M‚nagŠres
我也尝试直接这样做,但结果相同:
echo iconv('CP1252', 'UTF-8', "Ordures M‚nagŠres");
Ordures M‚nagŠres
你有没有想过它可以从哪里来,从php-xbase知道使用iconv转换字符但没有效果我失去了字母的重音...
谢谢你的帮助,对不起我的英语不好
【问题讨论】:
-
我找到了解决方案,.DBF 文件在 CP850 上编码。
标签: php encoding utf-8 windows-1252 cp1252