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

US ASCII file with newline character present within data #652

Open
anu17011993 opened this issue Jan 2, 2024 · 1 comment
Open

US ASCII file with newline character present within data #652

anu17011993 opened this issue Jan 2, 2024 · 1 comment
Labels
question Further information is requested

Comments

@anu17011993
Copy link

I have a US ASCII file with new line character \n occuring inside data (not actual line sep), the actual line separator is \r\n for this file. Hence when I try to read this file with US ASCII options the data spills over to the next row.

Sample Data

1111 AAA XXXX 090923900 RER\nDFT 1021
2222 AAA XXYY 234902930 RFTSDASD 1221

When I read the file with Cobrix library ASCII options the data looks like

1111 AAA XXXX 090923900 RER
DFT 1021
2222 AAA XXYY 234902930 RFTSDASD 1221

Do we have any option in cobrix to solve this problem, may be something similar to multiline in csv reader?

@anu17011993 anu17011993 added the question Further information is requested label Jan 2, 2024
@yruslan
Copy link
Collaborator

yruslan commented Jan 2, 2024

Hi, @anu17011993 .

Thanks for the question!

Both \n and \r\n are supported as line ending characters automatically when the input format is .option("record_format", "D").

Let me know if that helped. And if not, please specify the code snipped you are using to read the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants