sheetjs icon indicating copy to clipboard operation
sheetjs copied to clipboard

CSV format - Cyrillic letters and header columns are getting ignored

Open ulantiger opened this issue 6 years ago • 6 comments

Hello there, Thank you for your great job!

I found really strange, that from the original XLSX file when you convert it into CSV all strings and letters, which consist of Cyrillic letters, are getting removed or ignored. And also if the row after the header has missing cells, that column gets ignored as well.

I can send an XLSX file for your reference by email.

Regards, Ulanbek

ulantiger avatar Oct 07 '20 10:10 ulantiger

I am going to try to find the bug.

NeeEoo avatar Oct 07 '20 11:10 NeeEoo

Nevermind too hard for me.

NeeEoo avatar Oct 07 '20 12:10 NeeEoo

Please share a sample file, you can email to [email protected]

SheetJSDev avatar Oct 07 '20 16:10 SheetJSDev

Hello I also ran into the problem of creating a file with the .dbf extension, all Cyrillic characters in the JSON format from which I take the data are ignored, they just turn into "_" Are there any ways to solve this problem?

Paxton1337 avatar Nov 06 '20 15:11 Paxton1337

Hi, Still waiting for the answers and bug fix. I believe it should be connected to utf-8 charsets. Let's wait.

-- Sent from Mail.ru app for Android Friday, 06 November 2020, 03:54pm +00:00 from Gleb Rutskiy [email protected] :

Hello I also ran into the problem of creating a file with the .dbf extension, all Cyrillic characters in the JSON format from which I take the data are ignored, they just turn into "_" Are there any ways to solve this problem? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub , or unsubscribe .

ulantiger avatar Nov 06 '20 23:11 ulantiger

You have to explicitly pick a codepage that includes the characters you want. The typical codepage for Cyrillic is Windows-1251 , and the option has to be specified when writing to CSV or read from DBF or writing to DBF:

    XLSX.read(data, {..., codepage: 1251});
    XLSX.write(wb, {..., codepage: 1251});

SheetJSDev avatar May 04 '21 20:05 SheetJSDev