简体   繁体   中英

How to set charset UTF-8 in PHP Invoicr script

I'm using https://github.com/farjadtahir/pdf-invoicr .

Problem is when I add diacritics to $invoice->setFrom() (or anywhere else) diacritics not showing up.

I tried $invoice->setFrom(array(iconv("UTF-8", "ISO-8859-1","ÆØÅ") from this comments but still diacritics not working.

Next I tried https://stackoverflow.com/a/21555497/2893691 again not working.

So, how to finally convert ľščťžýáíé to UTF-8 in invoicr?

EDIT - NEW INFO

I'm used mb_detect_encoding() and return is UTF-8 already. But when I try show for example string ičo123 the result is empty. Not showing.

I tried add header('Content-Type: text/html; charset=utf-8'); and still diacritics not working.

EDIT 2 - NEW INFO

I tried this script http://www.fpdf.org/en/script/script92.php and still not working. Here is screenshot of downloaded example from link above:

在此处输入图片说明

问题已解决 - 使用了EDIT 2 中的脚本并从phpinvoice.php文件中删除了所有iconv()函数。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM