webby icon indicating copy to clipboard operation
webby copied to clipboard

Fixing encoding issue in core_ext/string.rb

Open jcf opened this issue 15 years ago • 1 comments

When running webby-gen under Ruby 1.9.1 an invalid multibyte character in the String extensions file will potentially produce an encoding error.

webby-0.9.4/lib/webby.rb:104:in `require': gems/ruby-1.9.1-p378/gems/webby-0.9.4/lib/webby/core_ext/string.rb:15: invalid multibyte char (US-ASCII) (SyntaxError)

webby-0.9.4/lib/webby/core_ext/string.rb:15: invalid multibyte char (US-ASCII)

This can be fixed by simply specifying UTF-8 encoding throughout the string extensions file using something like…

# encoding: utf-8

Maybe this fix could be added to master?

jcf avatar Mar 11 '10 17:03 jcf

Thanks for that. I can run the specs now under 1.9.1 but there are three failures due to the core extension to Hash.

robertwahler avatar May 06 '10 14:05 robertwahler