【问题标题】:PHP Tidy : Unexpected Special Characters after parsingPHP Tidy:解析后出现意外的特殊字符
【发布时间】:2013-08-20 11:27:08
【问题描述】:

我在加载时使用 PHP Tidy 来减小文档大小。这是我用于 PHP Tidy 的代码。

$html_output = ob_get_clean();
$tidyConfig = array(
'indent' => false,
'hide-comments' =>true,
'join-classes'=>true,
'join-styles'=>true,
'drop-proprietary-attributes'=>true,
'output-html' => true,
'input-encoding' => 'utf8',
'output-encoding' => 'utf8',
'show-body-only' =>false,
'fix-backslash' => true,
'quote-marks' => true,
'wrap' => 1024,
'bare' => true);

echo tidy_parse_string($html_output, $tidyConfig);

但是我得到了一些意想不到的英镑特殊字符。我得到的不是£,而是某些地方的问号符号。在某些地方,甚至空格都被替换为�。

该图像是我输出的屏幕不足。第一个实际上是 3226797.99 英镑,后面是一些空格。

请提出解决方案。谢谢。

【问题讨论】:

    标签: php encoding htmltidy


    【解决方案1】:

    如果您使用 £ 而不是正常显示的 £,由于字符集,我们在一台服务器上会遇到此问题

    【讨论】:

      猜你喜欢
      • 2013-08-02
      • 1970-01-01
      • 1970-01-01
      • 2022-01-01
      • 2022-11-05
      • 1970-01-01
      • 1970-01-01
      • 2017-05-21
      • 1970-01-01
      相关资源
      最近更新 更多