James
James

Reputation: 3275

Downloading a CSV file with utf-8 encoding

We have a web app that stores and works with data with character encoding UTF-8.

When I open a CSV file exported from our system, I run into trouble as some programs will interpret the CSV as a different character encoding and funny symbols start to appear.

I've tried sending a http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8 but OpenOffice doesn't seem to respect that.

Is there a way to force the file to be in UTF-8 encoding?

I could leave the file in UTF-8 and rely on our users to sort it out - however our users will not be particularly technical so I'm not sure this is wise.

Would a safer approach just be to convert the data to a basic character set before exporting?

Upvotes: 0

Views: 1615

Answers (1)

abesto
abesto

Reputation: 2351

We had a similar problem some time ago. The solution that worked for all applications was to send UTF-16LE encoded data with BOM.

Upvotes: 2

Related Questions