Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add a test for CSV writeFile encoding#1495

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
alubbe merged 1 commit intoexceljs:masterfromArtskydJ:test-csv-out-encoding
Oct 9, 2020

Conversation

@ArtskydJ
Copy link
Contributor

Summary

I saw a few issues (#995,#1473) regarding CSV output encoding, and I wondered if it was working.

Test plan

So I wrote a test... Turns out it is working.

@alubbealubbe merged commita487181 intoexceljs:masterOct 9, 2020
@pputnam-NAVEX
Copy link

Was the new Excel document opened and checked after it was written to? I can successfully encode the file as UTF-8, check in console fine, but when Excel opens the document characters including the Hebrew text used in the test are gibberish. Notepad++ correctly displays it and if I use Notepad++ to encode it to UTF-8-BOM I can re-open the spreadsheet and it will display correctly.

@pputnam-NAVEX
Copy link

Adding:
worksheet.getCell('A1').value = "\ufeff" + worksheet.getCell('A1').value;

Right before the writeFile works, also if this same file is then read using readFile \ufeff is undetectable - unsure if this is something worth adding as BOM isn't recommended but limitations in viewability of UTF-8 characters when opening actual Excel files for non-technical or data visualization may be helpful.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@alubbealubbealubbe approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@ArtskydJ@pputnam-NAVEX@alubbe

[8]ページ先頭

©2009-2025 Movatter.jp