I want to correct PHP encoding problems on PHPLIST for SHIFT-JIS and UTF-8 foreign fonts -
i have phplist
on server jammed encoding japanese fonts.
i installed foreign language pack, still cannot encode shift-jis
, utf-8
.
how correct php' s encoding in files encoding definition lines correct encoding in each page php makes?
i think problem script of program not define encoding each page, since encoding correction of version program.
2 possible source of problems: php script , database @ (if any).
by sending approiate header before content has been sent client (simply speaking, headers must sent @ beginning of code possible), encoding "defined" by
<?php header('content-type: text/html; charset=utf-8');?>
edit!
esailija gave review , correction (see comments below) on answer not correct question. suggested esailija, should check transmission encoding instead on storage encoding itself.
my original answer kept here "hall of shame".
note if using dbms mysql, encoding in database should set (
utf8_general_ci
recommended, backup data completely before applying changes existing data , on independent testing server first, changing encoding in database disaster).
Comments
Post a Comment