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

Save output as binary #22

Closed
wants to merge 1 commit into from
Closed

Conversation

k0kubun
Copy link

@k0kubun k0kubun commented Apr 13, 2018

because simplecov originally reads the source file as binary https://github.com/colszowka/simplecov/blob/v0.16.1/lib/simplecov/source_file.rb#L94.

This Encoding::UndefinedConversionError #20 is essentially caused by the mismatch of protocols between read and write.

If we always use the template encoding of views/detail.html.erb (UTF-8), it should work for many cases, but such a fix won't work for an encoding which is not compatible with UTF-8. So this patch should be the best fix for this issue.

Fix #20

because simplecov originally reads the source file as binary
https://github.com/colszowka/simplecov/blob/v0.16.1/lib/simplecov/source_file.rb#L94.

This Encoding::UndefinedConversionError
fguillen#20
is essentially caused by the mismatch of protocols between read and
writes.

If we always use the template encoding of views/detail.html.erb (UTF-8),
it should work for many cases, but such a fix won't work for an encoding
which is not compatible with UTF-8. So this patch should be the best
fix for this issue.
Copy link

@clucas clucas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's also how I thought it should be fixed

tarhashi added a commit to naviplus-asp/simplecov-rcov that referenced this pull request Jul 5, 2018
@johan-smits
Copy link

Any progress on this?

@danbernier
Copy link

Any word here? This seems like a well-reasoned fix...

@huangyq23
Copy link

Most recent release was in 2011, I think this project is no longer maintained despite still being used.

@k0kubun k0kubun closed this Jun 20, 2023
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.

Compatibility issue with ruby 2.5 - Encoding::UndefinedConversionError: ... from ASCII-8BIT to UTF-8
5 participants