Search

I'm currently building a custom CSV export which already works fine: I'm using Content Type Mappings to create the file. The only problem I have is file encoding. When I open the file in Excel all umlauts are messed up when using UTF-8 – using ISO-8859-1 didn't work either.

I'm not sure if I either use the wrong encoding or if the encodings set in my XSL stylesheet and in content type mappings conflict somehow: I have set encoding="ISO-8859-1" (template) and text/xml; charset=ISO-8859-1 (Content Type Mappings) respectively.

Is anyone around who can give me a clue how to solve this?

Are the umlauts okay in the actual text CSV file? You could try LibreOffice instead of Excel.

The umlauts are just fine in the file itself. Switching to another app isn't an option as the client wants to edit the file in Excel, so this is a requirement.

For the records, UTF-16 seems to work just fine for the umlauts but ; won't be recognized as column separator anymore. Still investigating.

I did a quick Google and did find reference to a problem with importing umlauts in Excel. It might be worth finding out what version the client uses - maybe it's a bug and has been fixed.

Using UTF-16 as encoding and 	 (tab) as column separator seems to work.

It's an Excel issue. It's crap, that's all.

There are settings in Excel to sort the file encoding out when it opens a file, but I forget where they are (buried in MSs usual onslaught of options).

I can confirm that using UTF-16 is the best choice, simply because Excel will load this correctly without having to change the import options. I am using 	 as delimiter and 
 as newline character.

I'm using 
 for new lines.
Are there any advantages in using your delimiters?

I guess it's the same as yours, apart from the leading0. isn't it?

Ah, and apart from being HEX vs. decimal (which doesn't make any difference for a value smaller than 10).

So, in short words: Both are TABs.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details