PHP Classes

utf8 characters not supported

Recommend this page to a friend!

      PHP MySQL XLSX Export  >  All threads  >  utf8 characters not supported  >  (Un) Subscribe thread alerts  
Subject:utf8 characters not supported
Summary:i use Hebrew_bin and it come out as garbage
Messages:2
Author:el
Date:2013-08-23 13:34:22
Update:2013-08-23 16:52:08
 

  1. utf8 characters not supported   Reply   Report abuse  
Picture of el el - 2013-08-23 13:34:23
i use Hebrew_bin and it come out as garbage

  2. Re: utf8 characters not supported   Reply   Report abuse  
Picture of Gianluca Zanferrari Gianluca Zanferrari - 2013-08-23 16:52:08 - In reply to message 1 from el
Hi, I do not have lot experience with utf_8 but you can try this:

-1

put an header in the php class (end of it); I put here the whole snippet:

/*
* send the data to browser / excel
*/
function to_excel( $fn ) {

header("Pragma: public");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment;filename=".$fn);
header('Content-Type: text/html; charset=utf-8');
echo($this->xml_template);

}

-2

Add utf-8 in the xml template (file template.xml) like this:

<?xml version="1.0" encoding="utf-8" ?>

Let me know.

Cheers