mholt / PapaParse

Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
http://PapaParse.com
MIT License
12.55k stars 1.15k forks source link

Parse csv file with 'gbk' encoding error #849

Open GarasChan opened 3 years ago

GarasChan commented 3 years ago

I parse a csv file that encoding is 'utf-8-bom' with encoding 'gbk', it return the same result with encoding 'utf-8'. current result: image expect result: image

pokoli commented 3 years ago

Hi @ChenGuanglin0924 ,

I do not understand your issue. Could you please clarify which configuration are you using to parse the file? What do yo mean with is 'utf-8-bom'? It starts with the utf-8-bom?

It will be also great if you can share the PapaParse version you are using.

GarasChan commented 3 years ago

Steps to Trigger Behavior: 1、In window system, open a csv file that encoding is 'utf-8' and save as new encoding 'utf-8' with BOM. 2、Parse this file with encoding 'gbk', it return the same result with encoding 'utf-8', but the result is not the expect.

I do it with default configuration in the demo on the website.