Chinese Characters Not Showing Properly #1218
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#1218
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have a csv exported from google sheets
(Since I can't upload csv files on here, here's the link to the google sheet. Please download as csv when testing!)
https://docs.google.com/spreadsheets/d/1fJ4UqUlxAe9aP74iVVP17kwuP2WEeOqVQnImLZ7vt3k/edit?usp=sharing
My Code
Unfortunately when I print it on my terminal, the Chinese Characters (A3 in traditional chinese, A4 in simplified chinese) are not the same as the csv file.
I read somewhere that google exports UTF-8 so that is why I used the codepage 65001. Without it, it would spit out gibberish.
If the issue isn't me, would the workaround be to convert to UTF-16? Is this even possible?
Let's see where the issue is coming from. Can you share the actual google sheet (make it public or protected, and post a share link here) -- you can make a new sheet with just the screenshotted contents
@SheetJSDev edited original post with link already, otherwise it's here as well.
https://docs.google.com/spreadsheets/d/1fJ4UqUlxAe9aP74iVVP17kwuP2WEeOqVQnImLZ7vt3k/edit?usp=sharing
Thanks for sharing, you can take down the sheet. The XLSX export seems to be parsed correctly but the CSV export is not
Unfortunately, I'm required to only work with CSV files, thanks for looking into it. Hopefully fixes will come soon :)
Inverting through windows-1252 isn't always consistent with node buffer behavior, the following patch handles the buffer directly rather than trying to encode/decode a binary string:
Feel free to submit that as a PR