3

我正在使用这个wkhtmltopdf 0.12.3 (with patched qt)版本的 wkhtmltopdf。使用蒙特塞拉特字体系列。

HTML是这样的,

<strong>
    This Agreement for home staging and rental of furniture and accessories 
</strong>
(“Agreement”) is entered this 

输出为,

家具和配件的家庭布置和租赁协议(同意)

和,

<u>Services</u>&nbsp; 
Subject to the terms and conditions of this </span>

输出为,

 服务受本条款和条件的约束

为什么这些Â介于两者之间?

我试图像这样替换引号和空格,

$formData = str_replace('&nbsp;', ' ', $formData);
$formData = str_replace('&quot;', '"', $formData);
$formData = str_replace('“', '"', $formData);
$formData = str_replace('”', '"', $formData);

但没有帮助。难道我做错了什么?搜索,但找不到解决方案。

4

1 回答 1

5

在 head 标签后写下:

<meta charset="UTF-8" />
于 2016-12-19T10:31:55.690 回答