Bunlong / react-papaparse

react-papaparse is the fastest in-browser CSV (or delimited text) parser for React. It is full of useful features such as CSVReader, CSVDownloader, readString, jsonToCSV, readRemoteFile, ... etc.
https://react-papaparse.js.org
MIT License
364 stars 61 forks source link

BOM byte for opening CSV in Excel with UTF8 #63

Closed karland closed 3 years ago

karland commented 3 years ago

Hi, thanks for react-papaparse.

After discussing it at https://github.com/mholt/PapaParse/issues/830, I wonder, if you would be willing to add an option for a BOM byte, so that Excel recognizes the CSV directly as UTF8. react-csv-downloader is doing it here, but I would like to move to react-papaparse because I also would need the upload functionality.

The API could be

<CSVDownloader
  data={data}
  filename={'filename'}
  type={'link'}
  bom={true}
>
  Download
</CSVDownloader>

Thanks a lot.

Bunlong commented 3 years ago

@karland Okay, I got it. I will add it as soon as possible; In the week maybe. When done I will let you know. Thanks :pray:

karland commented 3 years ago

@Bunlong Wow, great, this is awesome. Thanks a lot.