-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
Choices on record delimiter (line break) #27
Comments
Hi @mmliar , thanks for the suggestion and sorry for my slow response. You're right. In the section 2, it says
Though it also says "This section documents the format that I think we should give an option for users to use |
Thank you @ryu1kn . This is great! I have to say your package saved me tons of time instead of having to handle CSV formatting and all the headaches myself. By the way, I think in your commit f31beb5, you mentioned:
You probably mean:
Again, thanks for making the changes and the great work! |
Thanks for the encouraging comment 😃 and also saved me from publishing the embarrassing mistake 😂 |
Released as v1.4.0! Please reopen this ticket if you see any problems 😉 |
Can you also allow a single CR |
@janKir Didn't expect anyone wants to use only CR for a newline unless they're using very old version of Mac (before OS X). Do you have to cater for those Macs or are you trying to use this library to generate not really CSV? |
These are the specifications for an import file of a software system. The content is actually just csv with However, I'm wondering why those options are so strongly restricted. Are there any advantages for allowing just two alternatives - also for the field delimiter? I know, that in 99% of cases this will be exactly what's needed. But why don't we just let the rest choose whatever option they need? |
Hi Ryuichi,
Currently the record delimiter is '\n' (LF). However, as per RFC4180, the line break is expected to be '\r\n' (CRLF).
I do understand that under Linux environment, the extra '\r' (CR) may cause a lot of problems, therefore I'm wondering if it is possible to at least have a choice for people to choose either to use '\n' (LF) or '\r\n' (CRLF) as the line delimiter.
Just to contribute more information, the reason why I'm sending this request through is many applications based on Windows platform will not be able to read proper line breaks without seeing '\r\n' (CRLF), which will result in a fail in reading the CSV file.
Thanks,
Ming
The text was updated successfully, but these errors were encountered: