TCPDF UTF-8 符号未显示 [英] TCPDF UTF-8 symbols not showing up
问题描述
我使用的是最新的 TCPDF 版本 (5.9).但是编码有一些奇怪的问题.我需要立陶宛语符号,如:ąčęėįšųūž.但是只得到很少的.其他保持像 ?????所以我该怎么做 ?我使用默认时间字体(它带有 TCPDF 下载).
Im using latest TCPDF version(5.9). But have some strange problems with encoding. I need Lithuanian language symbols like: ąčęėįšųūž. But get only few of it. Other remain like ????? So what should I do ? I use default times font(it comes with TCPDF download).
任何帮助将不胜感激.
推荐答案
将 TCPDF 构造函数上的 $unicode
参数设置为 false
和 $encoding
参数到 'ISO-8859-1'
或其他一些字符映射.
Set the $unicode
parameter on the TCPDF constructor to false
and the $encoding
parameter to 'ISO-8859-1'
or some other character map.
这将帮助您:
UTF-8 unicode 的默认值:
Default for UTF-8 unicode:
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
欧洲字符集的构造函数示例:
Example of constructor for European charset:
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, false, 'ISO-8859-1', false);
这篇关于TCPDF UTF-8 符号未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!