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 to a String on Windows fails #1

Closed
test-org-rename opened this issue Nov 30, 2009 · 2 comments
Closed

Outputting to a String on Windows fails #1

test-org-rename opened this issue Nov 30, 2009 · 2 comments

Comments

@test-org-rename
Copy link

Because pipes are opened in text mode by default, the output for binary types like PNG is mangled.
To fix this issue simply call the following line in the output_and_errors_from_command method:
stdin.binmode
Do this for both ways (Open3#popen3 and IO#popen). Note that it will also affect text types but should really not be an issue because \n is a valid newline for SVG and other text formats.

Regards,

Pascal

@glejeune
Copy link
Owner

glejeune commented Dec 5, 2009

Ok... But i can't test because i don't use Windows. Say me if it's ok.

@test-org-rename
Copy link
Author

I've modified my local copy like you, so yes it should be ok. Before testing it i have some other issues, i'll create other tickets for them, watch out.

This issue was closed.
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