Adding UTF-8 BOM to CSV export

Adding UTF-8 BOM to CSV export

WakaruWakaru Posts: 13Questions: 5Answers: 0

Hello,

I need to add UTF-8 BOM code into Datatables CSV export script (CSV button) to get non-ASCII characters working in Excel spreadsheets. There's an article about this issue at http://www.skoumal.net/en/making-utf-8-csv-excel

So to get it done, could you please tell which Datatables script file I should add this modification to?

Thanks!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,145Questions: 1Answers: 10,403 Site admin
    Answer ✓

    See the bBomInc option.

    Allan

  • WakaruWakaru Posts: 13Questions: 5Answers: 0

    Unfortunately that didn't work for me. The test data I'm exporting to a CSV file is still 360 bytes lenght when it's 363 bytes with the BOM code.

    In which version should this work? Or is there anything else I should try to figure out?

    Thanks again!

  • allanallan Posts: 63,145Questions: 1Answers: 10,403 Site admin

    That should work. Could you link me to the page you are using?

    UTF8 BOM isn't used very often, so it is possible there is a bug there, but it should work as far as I am aware.

    Allan

  • WakaruWakaru Posts: 13Questions: 5Answers: 0

    Sorry, it's not a public site and therefore cannot link to that page. I could try to install a demosite though, but it takes some extra time. So guess I need to come back later after I have the site up and running.

  • WakaruWakaru Posts: 13Questions: 5Answers: 0

    After tried this in another enviroment it did work like it should.

This discussion has been closed.