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

Outputting \r\n if not necessary on Windows #122

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

Novakov
Copy link
Collaborator

@Novakov Novakov commented Sep 19, 2023

Windows, by default, sets stdout to _O_TEXT mode which automatically handles transformation of \n into \r\n (and vice versa for stdin, source https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setmode?view=msvc-170#remarks).

Define EOL as \n as thats ok for both *nix and Windows. Additionally this solve issue with double new lines when redirecting orbcat output to file on Windows.

Windows, by default, sets stdout to _O_TEXT mode which automatically
handles transformation of \n into \r\n (and vice versa for stdin, source https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setmode?view=msvc-170#remarks).

Define EOL as \n as thats ok for both *nix and Windows. Additionally
this solve issue with double new lines when redirecting orbcat output to
file on Windows.
@mubes mubes merged commit 523421a into orbcode:main Oct 2, 2023
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants