Comments (1)
Another workaround is be sure to strip any BOM sequence .
You can do it with strip-bom module :
Ex:
var fs = require('fs');
var stripBom = require('strip-bom');
var rs = fs.createReadStream(file);
var csvlintInstance = csvlint();
rs
.pipe(stripBom.stream())
.pipe(csvlintInstance)
.on('error', function (errArr) {
console.log(errArr);
})
...
By the way,
If you convert a .csv file ti UTF-8 directy from Windows notepad , you'll get one file with BOM in most cases, you can check it with:
file example.csv
example.csv: UTF-8 Unicode (with BOM) text, with CRLF line terminators
from csvlint.rb.
Related Issues (20)
- Support CSV dialects in CLI HOT 2
- CSV dialects link in README.md is broken HOT 1
- Clarification README update sought on which JSON Table Schema standard is supported
- csvlint is missing libcurl.dll HOT 3
- undefined method `present?' for nil:NilClass HOT 3
- Duplicate errors
- Custom Type
- Release a new version HOT 1
- Validation failing when some columns are not named and others are
- invalid_encoding for no apparent reason HOT 6
- Support skipBlankRows from W3C Tabular Metadata
- Validation not working as expected.
- Making POST requests via Node.js returns 'empty' response
- CONTRIBUTING.md is out of date HOT 1
- Requires ruby < 3.2 HOT 2
- Pre-commit integration
- Activesupport undefined method `deprecator'
- Warning: CSV gem extract from Ruby 3.4
- Syntax out of syntax with latest StandardRb rules
- Pre-commit passes a list of files to lint but csvlint can only accept one HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from csvlint.rb.