-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Encoding error on OS X 10.11.4 Beta (15E33e) #2871
Comments
It seems the encoding for the path of the template is the problem: I just had the same issue and I solved it by creating a file
now I call rubocop with
|
Unfortunately, I was wrong and my fix doesn't actually fix anything :/ Also, I can't reproduce the problem reliably: When I make changes to the command line switches for rubocop, it works. When I run the command a second time, it throws the error. |
... and that lead me to the cache option. with |
+1 for same issue |
I've finally been able to reproduce the problem. The Working on a solution. |
@Freika @moritzschepp @cthulhu Perhaps you can try out changes in my pull request? |
…html [Fix #2871] Make sure messages read back from cache are UTF-8
This still happens on rubocop 0.38.0. Same solution from @moritzschepp still applies: |
Indeed, with 0.38.0, if I switch on caching, I still get: |
Then I'll just use @moritzschepp's solution even though I can't reproduce the problem and don't fully understand it. PR coming up. |
[Fix #2871] Make HTML template path UTF-8 encoded
I just played around with rubocop's sources and made a test case that fails. I don't know how to fix it though, I assume the actual problem is how
|
@moritzschepp Your posting of source code here is enough. Thanks! |
@moritzschepp I have tried to provoke the same problem that you displayed in your example by running
So we get If anyone has a better way to show that we do get unexpected behavior in some environments, let me know and I'll revisit the issue. |
Command
rubocop --format html -o rubocop.html
returned an error:I found similar issue about Japanese encoding here: #1617
But my solution was to delete code from gem source:
lib/rubocop/formatter/html_formatter.rb:55
After deleting
, encoding: Encoding::UTF_8
from 55 line commandrubocop --format html -o rubocop.html
created correct html file with scan results.The text was updated successfully, but these errors were encountered: