Welcome Guest, Not a member yet? Register   Sign In
pdf export with unicode using mpdf
#11

[eluser]Bigil Michael[/eluser]
code used in my model to insert contents to db
Code:
$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
Code:
<p align="JUSTIFY"><span  karthika; font-size: medium;">ഇത്  ഒരു ടെസ്റ്റ്‌ വർക്ക്‌ ആണ് </span></p>

reading contents from db like this
Code:
$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 ????
#12

[eluser]Otemu[/eluser]
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??

#13

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




Theme © iAndrew 2016 - Forum software by © MyBB