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

`scan': invalid byte sequence in US-ASCII (ArgumentError) #245

Open
kaitaku opened this issue May 20, 2020 · 1 comment
Open

`scan': invalid byte sequence in US-ASCII (ArgumentError) #245

kaitaku opened this issue May 20, 2020 · 1 comment

Comments

@kaitaku
Copy link

kaitaku commented May 20, 2020

Hi

The error below occurs even though the erb file is uft-8.

/Users/xxxxx/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/erb.rb:454:in scan': invalid byte sequence in US-ASCII (ArgumentError) from /Users/xxxxx/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/erb.rb:454:in trim_line2'
from /Users/xxxxx/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/erb.rb:411:in call' from /Users/xxxxx/.rvm/rubies/ruby-2.5.7/lib/ruby/2.5.0/erb.rb:411:in scan'
from /Users/xxxxx/.rvm/gems/ruby-2.5.7/gems/rufo-0.12.0/lib/rufo/erb_formatter.rb:74:in process_erb' from /Users/xxxxx/.rvm/gems/ruby-2.5.7/gems/rufo-0.12.0/lib/rufo/erb_formatter.rb:36:in format'
from /Users/xxxxx/.rvm/gems/ruby-2.5.7/gems/rufo-0.12.0/lib/rufo/command.rb:146:in format' from /Users/xxxxx/.rvm/gems/ruby-2.5.7/gems/rufo-0.12.0/lib/rufo/command.rb:49:in format_stdin'
from /Users/xxxxx/.rvm/gems/ruby-2.5.7/gems/rufo-0.12.0/lib/rufo/command.rb:38:in run' from /Users/xxxxx/.rvm/gems/ruby-2.5.7/gems/rufo-0.12.0/lib/rufo/command.rb:12:in run'
from /Users/xxxxx/.rvm/gems/ruby-2.5.7/gems/rufo-0.12.0/exe/rufo:4:in <top (required)>' from /Users/xxxxx/.rvm/gems/ruby-2.5.7/bin/rufo:23:in load'
from /Users/xxxxx/.rvm/gems/ruby-2.5.7/bin/rufo:23:in <main>' from /Users/xxxxx/.rvm/gems/ruby-2.5.7/bin/ruby_executable_hooks:24:in eval'
from /Users/xxxxx/.rvm/gems/ruby-2.5.7/bin/ruby_executable_hooks:24:in `

'

@gingermusketeer
Copy link
Member

@kaitaku Thanks for opening an issue. It looks like you are piping the code into rufo? Are you able to pipe it into ruby -e "puts STDIN.read.encoding" and send me the output?

Strange that the code is not being treated as UTF8 by default.

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

No branches or pull requests

2 participants