rubyide / vscode-ruby

Provides Ruby language and debugging support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby
MIT License
1.26k stars 285 forks source link

Fails when using special characters #862

Closed miguelpeniche closed 1 year ago

miguelpeniche commented 1 year ago

Your environment

Expected behavior

Format

Actual behavior

If something in my code have special characters such as accents (e.g. "Título"), it returns Failed with exit code: 1

This is the error log:

Failed with exit code: 1. '/Users/miguel/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/htmlbeautifier-1.4.2/bin/htmlbeautifier:12:in `rescue in beautify': Error parsing standard input: invalid byte sequence in US-ASCII on line 1 (RuntimeError) from /Users/miguel/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/htmlbeautifier-1.4.2/bin/htmlbeautifier:9:in `beautify' from /Users/miguel/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/htmlbeautifier-1.4.2/bin/htmlbeautifier:111:in `<top (required)>' from /Users/miguel/.asdf/installs/ruby/3.1.4/bin/htmlbeautifier:25:in `load' from /Users/miguel/.asdf/installs/ruby/3.1.4/bin/htmlbeautifier:25:in `<main>' /Users/miguel/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier/parser.rb:37:in `rescue in dispatch': invalid byte sequence in US-ASCII on line 1 (RuntimeError) from /Users/miguel/.asdf/installs/ruby/3.1.4/lib/ruby/gems/3.1.0/gems/htmlbeautifier-1.4.2/lib/htmlbeautifier/parser.rb:31:in ...

*This and the next section should include screenshots, code samples, console output, etc. The more information we have to reproduce the better!*
*If this is a syntax highlighting report please include a code sample that can be quickly copied and pasted!*
miguelpeniche commented 1 year ago

Sorry this issue corresponds to https://github.com/aliariff/vscode-erb-beautify and they already resolved it here.

Just added "vscode-erb-beautify.customEnvVar": { "LC_ALL": "en_US.UTF-8" } to VS Code settings.