friends, I am developing one application using php/mysql. I have to export some of the datas from my databse to excel format. Everything works fine untill I use arabic characters. When there are arabic words in the databse, it goes funny characters.
The code I am using is…
Please give a solution to this…
In Excel, are you using a unicode font? Try changing the font of the worksheet concerned to a font line Lucide Sans Unicode
Actually my problem is to export. I do not have a way to set up font styles. Only I can export raw datas.
What is the selected MySQL charset for the connection and on the server? What Collation are the database tables set to?
your old data inserted as Latin1 default … you can’t view it at all …
u must change ur DEFAULT CHARSET in Mysql to utf8
id int(11) NOT NULL auto_increment,
x varchar(50) default NULL,
xy varchar(50) default NULL,
xyz varchar(250) default NULL,
date timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
then in ur insert browser or whatever u must change the text to utf8 too
mysql_query(“set names utf8”);