Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Csv doesn't handle csv file with CR+LF (windows) not always correct #4573

Open
EvertDekker opened this issue Feb 21, 2024 · 0 comments
Open

Comments

@EvertDekker
Copy link

Current Behavior

On a windows machine the core Csv node will handle the CR+LF not correct.
When the checkbox Include empty string is set there will be 2 messages per row, instead of one.

See for details: https://discourse.nodered.org/t/strange-behaviour-csv-node/85747

Expected Behavior

The expected behavior should be only 1 message per csv row.
Removing the LF from the row will solve the problem, tested and confirmed.

Steps To Reproduce

booking.csv

Example flow

[{"id":"61b9e0b5ddd16b80","type":"csv","z":"9e38d6c8b155bad2","name":"","sep":",","hdrin":true,"hdrout":"none","multi":"one","ret":"\\r\\n","temp":"","skip":"0","strings":false,"include_empty_strings":true,"include_null_values":true,"x":530,"y":460,"wires":[["7856411b210cf3f9"]]},{"id":"cbbab2d7a33172b0","type":"file in","z":"9e38d6c8b155bad2","name":"","filename":"payload","filenameType":"msg","format":"utf8","chunk":false,"sendError":false,"encoding":"utf8","allProps":false,"x":540,"y":380,"wires":[["61b9e0b5ddd16b80","cc6f864112b94d3d"]]},{"id":"85abdc5b6dde425f","type":"inject","z":"9e38d6c8b155bad2","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"C:\\\\temp\\\\booking.csv","payloadType":"str","x":560,"y":300,"wires":[["cbbab2d7a33172b0"]]},{"id":"7856411b210cf3f9","type":"debug","z":"9e38d6c8b155bad2","name":"debug 10","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":760,"y":460,"wires":[]},{"id":"cc6f864112b94d3d","type":"debug","z":"9e38d6c8b155bad2","name":"debug 11","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":760,"y":380,"wires":[]}]

Environment

  • Node-RED version:
  • Node.js version:
  • npm version:
  • Platform/OS:
  • Browser:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant