We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trim: true
Describe the bug
When using the trim: true option with utf16le encoding, the content is modified.
utf16le
csv@5.5.3 contain csv-parse@4.16.3 Also reproduced for csv@6.1.3, csv-parse@5.2.0.
To Reproduce In csv-parse@5.2.0:
const assert = require('assert') const {parse: csvParse} = require('csv-parse/sync') const data = 'ф, ы' const encoding = 'utf16le' const delimiter = ',' const record_delimiter = '\n' const records = csvParse(Buffer.from(data, encoding), { //delimiter: Buffer.from(delimiter, encoding), //record_delimiter: Buffer.from(record_delimiter, encoding) encoding, trim: true }) const correctRecords = data .split(record_delimiter) .map( record => record .split(delimiter) .map(str => str.trim()) ) assert.deepStrictEqual(records, correctRecords)
Additional context
I need to parse utf16le encoded csv file with custom delimiter and record_delimiter. Please release bugfix also for csv-parse@4.16.3.
The text was updated successfully, but these errors were encountered:
fix(csv-parse): rtrim encoding support (#349)
cc29dff
8bf52f0
Sorry, something went wrong.
No branches or pull requests
Describe the bug
When using the
trim: true
option withutf16le
encoding, the content is modified.csv@5.5.3 contain csv-parse@4.16.3
Also reproduced for csv@6.1.3, csv-parse@5.2.0.
To Reproduce
In csv-parse@5.2.0:
Additional context
I need to parse
utf16le
encoded csv file with custom delimiter and record_delimiter. Please release bugfix also for csv-parse@4.16.3.The text was updated successfully, but these errors were encountered: