Skip to content

warning: BOM with non-UTF encoding ISO-8859-1 is nonsense #7972

@LinuxMercedes

Description

@LinuxMercedes

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 😄 )

Metadata

Metadata

Assignees

No one assigned

    Labels

    frozen-due-to-agehas-pull-requestSomebody suggested a solution to fix this issuestaleNobody stepped up to work on this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions