| The fix for PUP-8243 causes ruby to generate a warning if the default external encoding is US-ASCII:
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/file_system/file_impl.rb:83: warning: BOM with non-UTF encoding US-ASCII is nonsense
|
Since ASCII characters are single bytes, there is no need for a BOM to detect byte ordering (LSB/MSB), hence the message. I had assumed ruby would just ignore the `bom` prefix. We'll need to check that the current external encoding starts with `utf-` (case-insensitively I think), and only add the `bom` prefix if it does. See https://github.com/puppetlabs/puppet/pull/8639#issuecomment-891939114 |