Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Excel doesn't like accent characters

4:52 pm on Feb 12, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:June 17, 2008
posts: 47
votes: 0


I'm downloading data from my utf-8 db, putting it in XML tags (via PHP) and then downloading it as either CSV, HTML or XML.

Opening HTML and XML in my browser or editplus (simple text program) works fine and the french accent characters display properly.

But if I download as a CSV and open in Excel, the accent characters break.

Even if I open the HTML file (which works in the browser) in Excel, the accent characters break.

For the HTML file, I'm specifying utf-8 as so....

Content-Type: text/html; charset=UTF-8

Any ideas why MS Excel would ignore the specified charset when opening a file?
When I import the file I'm able to specify 'Unicode (UTF-8)' and that works.

Also, when downloading as CSV, do I also have to specify charset?

Content-Type: text/csv; charset=UTF-8


3:25 pm on Mar 18, 2009 (gmt 0)

Senior Member from CA 

WebmasterWorld Senior Member httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Aug 29, 2003
votes: 0


cantona, did you find a solution for this?

5:19 pm on Mar 18, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 17, 2001
votes: 0

FWIW, I have never coaxed Excel into handling encoding properly (it also has a problem with handling quoting in CSV files). While I prefer Excel for "real" spreadsheet work, OpenOffice Calc is fine for making simple text changes.
8:14 am on Mar 19, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:June 17, 2008
votes: 0

Work around:

I read somewhere that MS Office doesn't yet fully support UTF-8 characters.

So if the download format specified was *SV or RTF then I changed the character set back to latin1 using utf8_decode()

We no longer have accent problems in Excel.