UTF-8 files produced on Windows often contain a BOM. Puppet now reads most files as utf-8, but doesn't allow for them to have a leading BOM.
This can be a problem for end users on Windows, where they might need to go through workarounds to produce content without a BOM. For instance, PowerShell can write files as UTF-8 with the Out-File cmdlet, specifying -Encoding UTF8 - but the files are written with a BOM, which ends up blowing up Ruby if we try to read the files in Puppet (under certain circumstances).
An easy solution is to modify any calls specifying utf-8 when opening files for read, to instead specify bom|utf-8. Ruby will handle the BOM correctly in this case.
Note that the Ruby YAML.load_file API already handles the BOM situation correctly, so YAML files will generally be excluded from this problem.