简体   繁体   中英

Some data that are in UTF-8 such as 'æ' don't display correctly

I'm using the PHP port of John McNamara's Spreadsheet::WriteExcel Perl package which can be found here .

It works great but I have some data that are in UTF-8 such as æ and it doesn't display correctly inside the resulting file.

看起来使用 iconv 解决了这个问题。

$worksheet->write(0, 0, iconv("UTF-8", "ISO-8859-1//TRANSLIT", $str));

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