Welcome Guest, Not a member yet? Register   Sign In
load view utf-8
#1

[eluser]Unknown[/eluser]
i'm making pdf with tcpdf. the idea is to get the view that been rendered by CI then put it directly into tcpdf.

my problem is when im using load->view method, the arabic, russian, chinese (as far as i test) character cannot be display properly.

Code:
$html = $this->load->view(MOD.$this->uri->segment(2), $items, true);
$this->pdf->writeHTML($html, true, false, false, false, '');

output: 5 Ø¨Ùˆä¸–ç•Œä½ å¥½Ø±Ø§Ø¹ نتØ

but when im using string; the character can be display.

Code:
$html = "بو世界你好راع نتالبيسشةىلارؤtestingءئًٌَُلإإ`ـألأ[]ٍ~ْ}{لآآ";
$this->pdf->writeHTML($html, true, false, false, false, '');

is it problem come from load->view function?
#2

[eluser]Aken[/eluser]
If your view is an HTML file, make sure it has the appropriate meta tag.
#3

[eluser]Unknown[/eluser]
thanks, its work!




Theme © iAndrew 2016 - Forum software by © MyBB