0

With Coldfusion when I export HTML as an .XLS file, characters containing an umlaut, such as (ü,ö,ä), do not display correctly. For example, they display as ü or â instead of umlauts.

I tried these solutions, but no change.

<cfcontent type="application/vnd.ms-excel;charset=windows-1252" reset="yes">
<cfcontent type="application/vnd.ms-excel;charset_ISO-8859-1 "/>
<cfcontent type="application/vnd.ms-excel;charset_utf-8"/>
<cfheader name="Content-Disposition" value="attachment; filename=dt_memadr_xls.xls" charset="iso-8859-1">
6
  • Please show us the data you are exporting. Without more information it sounds like it is actually HTML - not a binary Excel file. Commented Aug 26, 2016 at 11:47
  • @Leigh It is query and html table. Commented Aug 26, 2016 at 11:55
  • (Edit) Do the characters display correctly on screen ie without the download? If so, that suggests the problem is Excel's interpretation of the HTML. Might try some of the suggestions here: stackoverflow.com/questions/5368150/php-header-excel-and-utf-8 Commented Aug 26, 2016 at 12:54
  • @Leigh with this <cfcontent type="application/vnd.ms-excel;charset=windows-1252" reset="yes"> work perfeclty in IE and Firefox, But in Chrome and Opera dosent show umlauts. Commented Aug 26, 2016 at 13:13
  • @Leigh 1. Charachters have normal output on Screen with Chrome and Opera . 2. i tried meta tag and still dosent work . 3. i speak about coldfusion and this thread is for PHP. i think what you in this page meas, is like meta tag with utf-8. Commented Aug 26, 2016 at 15:12

1 Answer 1

0

This is Answer .I added this tag to head.

<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
Sign up to request clarification or add additional context in comments.

2 Comments

Not quite. Since it is an Excel issue, all you should need is <meta>. (Like I mentioned above, that is what Excel uses for HTML). Header information is only used by the browser. Voting to close as a duplicate.
all you should need is <meta> ... meaning, the charset in the cfcontent is redundant.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.