gpt4 book ai didi

php - 我生成的 PDF 中的奇怪字符

转载 作者:可可西里 更新时间:2023-11-01 08:38:11 25 4
gpt4 key购买 nike

我得到 􀀊􀀠􀀉􀀉我的 PDF 中的字符,我已经删除了\r\n\r\n\t,修剪了所有内容,解码了 html 实体并删除了标签。没有任何帮助。数据来自 MySQL 数据库。

如有任何帮助,我们将不胜感激。

最佳答案

在添加到 pdf 之前检查字符串编码(使用 mb_detect_encoding),它是 unicode 字符串吗? MySQL 数据库中的数据可以是 unicode,但您的数据库连接可以使用其他编码。

关于php - 我生成的 PDF 中的奇怪字符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2871605/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com