My Environment
| Software |
Version(s) |
| Operating System |
Linux/Debian |
jekyll |
Latest |
github-pages |
No |
Expected Behaviour
No BOM warning is produced when files are read
Current Behavior
When using encoding: ISO-8859-1 in _config.yml, the following errors occur when building a jekyll site, once for every time a file is read:
.../vendor/bundle/ruby/2.5.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: BOM with non-UTF encoding ISO-8859-1 is nonsense
.../vendor/bundle/ruby/2.5.0/gems/jekyll-4.0.0/lib/jekyll/tags/include.rb:179: warning: BOM with non-UTF encoding ISO-8859-1 is nonsense
Inserting puts file_read_opts(context) on line 179 of include.rb shows {:encoding=>"bom|ISO-8859-1"}. Hard-coding the second argument to File.read() to be {:encoding=>"ISO-8859-1"} fixes the warning. I'm not sure where the bom bit is coming from or whether File.read() ought to be happy with it being there, but that appears to be the source of the problem.
(Sorry, I wish I could use utf-8 encoding too 😄 )
My Environment
jekyllgithub-pagesExpected Behaviour
No BOM warning is produced when files are read
Current Behavior
When using
encoding: ISO-8859-1in_config.yml, the following errors occur when building a jekyll site, once for every time a file is read:.../vendor/bundle/ruby/2.5.0/gems/jekyll-4.0.0/lib/jekyll/convertible.rb:41: warning: BOM with non-UTF encoding ISO-8859-1 is nonsense.../vendor/bundle/ruby/2.5.0/gems/jekyll-4.0.0/lib/jekyll/tags/include.rb:179: warning: BOM with non-UTF encoding ISO-8859-1 is nonsenseInserting
puts file_read_opts(context)on line 179 ofinclude.rbshows{:encoding=>"bom|ISO-8859-1"}. Hard-coding the second argument toFile.read()to be{:encoding=>"ISO-8859-1"}fixes the warning. I'm not sure where thebombit is coming from or whetherFile.read()ought to be happy with it being there, but that appears to be the source of the problem.(Sorry, I wish I could use utf-8 encoding too 😄 )