• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pdf export with unicode using mpdf

[eluser]Bigil Michael[/eluser]
code used in my model to insert contents to db
$data = array(
     'description' => ascii_to_entities($this->input->post('description')) ,

now updated the db collation to utf8_general_ci

now db content is like this
<p align="JUSTIFY"><span  karthika; font-size: medium;">ഇത്  ഒരു ടെസ്റ്റ്‌ വർക്ക്‌ ആണ് </span></p>

reading contents from db like this
$row =   $this->Authors_model->get_selected($selected_authors);
  $data['description'] = entities_to_ascii($row->description);

when i echo contents like print_r($data['description']) it prints ഇത് ഒരു ടെസ്റ്റ്‌ വർക്ക്‌ ആണ്
when i export it shows square boxes

if i save statically like $data['decription'] = 'ഇത് ഒരു ടെസ്റ്റ് വർക്ക് ആണ് ';
exports perfectly.

i searched a lot but didn't get any solution.
can you tell me is it a database issue ????

Can you not change the language setting in the database and save it as ഇത് ഒരു ടെസ്റ്റ്‌ വർക്ക്‌ ആണ്??

How do you know the current html code entities stored in the db are even valid??

[eluser]Bigil Michael[/eluser]
if I didn't change the database collation, save only asci values like #&1234;.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.