-
Notifications
You must be signed in to change notification settings - Fork 552
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
incompatible character encodings: ASCII-8BIT and UTF-8 Error #191
Comments
I met same problem with rails template applications. |
How did you fix it? |
I used content = File.read(path, encoding: 'utf-8')
content.gsub! /"ほげ"/, '"ふが"'
File.open(path, 'wb') { |file| file.write(content) } instead of gsub_file "config/locales/hoge.yml", /"ほげ"/, '"ふが"' |
I met same problem using see: https://github.com/erikhuda/thor/blob/master/lib/thor/actions/inject_into_file.rb#L98 |
@bastengao , did you fix this somehow ? |
On Version 0.19.4 - November 28, 2016 |
Running:
on README with the content
yields
Responsible for this is error the file test.thor:
The above means that I can't gsub a chunk of text with the Polish diacritics in a html.erb file, for example.
The text was updated successfully, but these errors were encountered: