Actions
Bug #14932
closedPuppet Strings JSON parsing error with UTF-8 vs US-ASCII (Encoding::InvalidByteSequenceError)
Description
When using kafo-export-params with the puppet-strings parser in an RPM build (which runs in a C locale), the JSON parsing can fail to read UTF-8 characters:
/usr/bin/kafo-export-params -c config/foreman.yaml -f asciidoc > /builddir/build/BUILD/foreman-installer-1.12.0/_build/options.asciidoc D, [2016-05-05T09:15:31.144665 #11338] DEBUG -- : Using Puppet module parser KafoParsers::PuppetStringsModuleParser /usr/share/gems/gems/json-1.8.3/lib/json/common.rb:155:in `encode': "\xE2" on US-ASCII (Encoding::InvalidByteSequenceError) from /usr/share/gems/gems/json-1.8.3/lib/json/common.rb:155:in `initialize' from /usr/share/gems/gems/json-1.8.3/lib/json/common.rb:155:in `new' from /usr/share/gems/gems/json-1.8.3/lib/json/common.rb:155:in `parse' from /usr/share/gems/gems/kafo_parsers-0.1.0/lib/kafo_parsers/puppet_strings_module_parser.rb:46:in `initialize' from /usr/share/gems/gems/kafo_parsers-0.1.0/lib/kafo_parsers/puppet_strings_module_parser.rb:12:in `new' from /usr/share/gems/gems/kafo_parsers-0.1.0/lib/kafo_parsers/puppet_strings_module_parser.rb:12:in `parse' from /usr/share/gems/gems/kafo-0.8.0/lib/kafo/puppet_module.rb:71:in `parse' from /usr/share/gems/gems/kafo-0.8.0/lib/kafo/configuration.rb:88:in `block in modules' from /usr/share/gems/gems/kafo-0.8.0/lib/kafo/configuration.rb:88:in `map' from /usr/share/gems/gems/kafo-0.8.0/lib/kafo/configuration.rb:88:in `modules' from /usr/share/gems/gems/kafo-0.8.0/bin/kafo-export-params:104:in `print_out' from /usr/share/gems/gems/kafo-0.8.0/bin/kafo-export-params:51:in `execute' from /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' from /usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run' from /usr/share/gems/gems/kafo-0.8.0/bin/kafo-export-params:155:in `<top (required)>' from /usr/bin/kafo-export-params:23:in `load' from /usr/bin/kafo-export-params:23:in `<main>'
A fix similar to #14473 might be possible for this parser.
Updated by Dominic Cleal over 8 years ago
- Related to Bug #14473: invalid byte sequence in US-ASCII on UTF-8 manifests under C locale added
Updated by Dominic Cleal over 8 years ago
- Blocks Feature #14809: Build RPMs for Fedora 24 added
Updated by The Foreman Bot over 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/kafo_parsers/pull/21 added
Updated by Dominic Cleal over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset kafo_parsers|ac376e2c373e84ef33938b3c258c237cf3b7efd4.
Actions