Treat source files as UTF-8 to avoid encoding errors #103

Merged
merged 1 commit into from Jan 27, 2012

Conversation

Projects
None yet
3 participants
@joeyates
Contributor

joeyates commented Jan 12, 2012

Avoid errors like this:
gems/simplecov-0.5.4/lib/simplecov/source_file.rb:158:in `block in process_skipped_lines!': invalid byte sequence in US-ASCII (ArgumentError)

A fixture file is included which contains a degree symbol. The line containing the symbol currently causes the above exception.

Treat source files as UTF-8 to avoid encoding errors.
Avoid errors like this:
gems/simplecov-0.5.4/lib/simplecov/source_file.rb:158:in `block in process_skipped_lines!': invalid byte sequence in US-ASCII (ArgumentError)

A fixture file is included which contains a degree symbol. The line containing the symbol currently causes the above exception.
@xaviershay

This comment has been minimized.

Show comment
Hide comment
@xaviershay

xaviershay Jan 14, 2012

Collaborator

I experienced this same error, and this patch fixed it. Spec looks good, I think it should be merged.

Collaborator

xaviershay commented Jan 14, 2012

I experienced this same error, and this patch fixed it. Spec looks good, I think it should be merged.

colszowka added a commit that referenced this pull request Jan 27, 2012

Merge pull request #103 from joeyates/master
Treat source files as UTF-8 to avoid encoding errors

@colszowka colszowka merged commit 58045dd into colszowka:master Jan 27, 2012

@colszowka

This comment has been minimized.

Show comment
Hide comment
@colszowka

colszowka Jan 27, 2012

Owner

Great, thanks a lot!

Owner

colszowka commented Jan 27, 2012

Great, thanks a lot!

@auxbuss auxbuss referenced this pull request Feb 20, 2012

Closed

Release new gem version #112

@colszowka

This comment has been minimized.

Show comment
Hide comment
@colszowka

colszowka Feb 22, 2012

Owner

New gem release 0.6.0 rolls out in a couple minutes

Owner

colszowka commented Feb 22, 2012

New gem release 0.6.0 rolls out in a couple minutes

rlqualls pushed a commit to rlqualls/sugarcane that referenced this pull request Feb 1, 2014

Assume UTF-8 encoding for files.
I can't get a failing test case, though it is failing on one of our
projects and is the same bug and fix as that in simplecov:
colszowka/simplecov#103
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment