Exporting to CSV "SÃO" and "Há"

Exporting to CSV "SÃO" and "Há"

rockdrigo10rockdrigo10 Posts: 1Questions: 0Answers: 0

Im exporting my data to csv and when there is any special character such as "SÃO" and "Há" the result is
SÃO PAULO and Há
Can you please help me on this?

Thank you in advance

Replies

  • colincolin Posts: 8,085Questions: 0Answers: 1,357

    We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • rf1234rf1234 Posts: 1,207Questions: 49Answers: 164
    edited February 18

    charset: 'UTF-8'
    should help
    Please take a look at this:
    https://datatables.net/reference/button/csv

    An example from my own coding:

    //custom button for cashflow csv generation
    $.fn.dataTable.ext.buttons.csvCashFlow = {
        extend: 'csv', fieldSeparator: ';', charset: 'UTF-8', bom: true,
                     filename: 'yourFilename',
       exportOptions: { ....
    
Sign In or Register to comment.