Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-5733

The Puppet Parser should ensure files are read with UTF-8

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • 1
    • Language 2016-02-24
    • Bug Fix
    • Hide
      The Puppet Parser now explicitly sets the encoding to UTF-8 when reading puppet source code. Earlier it would use the platform's native encoding which could lead to problems when later applying a catalog on a platform with a different encoding if the manifest contained characters outside of the US Ascii range.
      Show
      The Puppet Parser now explicitly sets the encoding to UTF-8 when reading puppet source code. Earlier it would use the platform's native encoding which could lead to problems when later applying a catalog on a platform with a different encoding if the manifest contained characters outside of the US Ascii range.

    Description

      The Puppet Parser should ensure that source files are read with UTF-8 encoding.
      One such place is in the Lexer where it uses Puppet::Filesystem.read ( which currently dos not accept an encoding argument - see PUP-5732).
      Another place is the Puppet Function Instantiator.

      In this ticket, it is important to track down the paths that leads to lexing of puppet source. It is possible to give the lexer a string - and that string may come from many different sources (mainly testing). There may be some places other than the two mentioned above where a file is read and the string the given to the lexer.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              henrik.lindberg Henrik Lindberg
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support