Skip to content

b4stien/js-csv-encoding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to create a windows-1252 CSV

Microsoft Excel will open all CSV files with the windows-1252 encoding (also called ansi). Under certain circomstances (Microsoft Excel >= 2007 on Windows), an UTF-8 encoded CSV with BOM might be correctly opened.

You can find in this repository an example of how to generate a CSV encoded in windows-1252 directly in the browser. This example depends on two external projects:

text-encoding

The version in this repo is slightly modified one. The Encoding Living Standard does not specify how to encode to windows-1252, hence the modifications at the end of encoding.js and the call to CustomTextEncoder (with a special flag) instead of TextEncoder.

For more rational about this, see https://github.com/inexorabletash/text-encoding#non-standard-behavior.

About

Showcase of how to create valid CSV client-side

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published