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

Issue caused by carriage returns #34

Open
jeffduda opened this issue Mar 23, 2021 · 3 comments
Open

Issue caused by carriage returns #34

jeffduda opened this issue Mar 23, 2021 · 3 comments

Comments

@jeffduda
Copy link

I've been trying to use the module to read some .fdf files that I have but was getting errors regarding value type. After much debugging I realized that the problem is with the headers. For some reason, each line in the header ends with a carriage return and a new line, i.e. \r\n. So when they are parsed and tokenized, there are now 5 tokens, the last being the \r. The code that reads the header then ignores each line as it only looks at lines with exactly 4 items after tokenization. I confirmed that adding the line "line = RemoveCharacters(line, '\r');" [here] (

line = RemoveCharacters(line, '*');
line = RemoveCharacters(line, '\"');
line = RemoveCharacters(line, '[');
line = RemoveCharacters(line, ']');
) resolves the issue, so I was hoping you could make that fix. I could submit a PR if you would prefer that.

@thewtex
Copy link
Member

thewtex commented Jun 15, 2021

@jeffduda PR would be appreciated!

@jeffduda
Copy link
Author

Great. I had given up on this and found some work arounds, but would much rather have the fixes implemented here. I'll try to get a PR up in the next week (or two).

@thewtex
Copy link
Member

thewtex commented Jun 15, 2021

@jeffduda thanks!!

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

No branches or pull requests

2 participants