Issue #22703 has been updated by Charlie Sharpsteen. Description updated Status changed from Unreviewed to In Topic Branch Pending Review
Thanks a bunch for reporting this and submitting a patch! This is actually a duplicate of #19295, but I'll close that issue since this one is linked to a PR on GitHub. The root of this issue happens to be the `Etc` module in the Ruby standard library which retrieves user info from `/etc/passwd`. For some reason, this module does not respect `Encoding.default_external` and always returns everything it reads as raw unencoded bytes. ---------------------------------------- Bug #22703: Comment with non-ASCII characters fails with Ruby 1.9 https://projects.puppetlabs.com/issues/22703#change-98153 * Author: Raphaƫl Pinson * Status: In Topic Branch Pending Review * Priority: Normal * Assignee: * Category: * Target version: * Affected Puppet version: * Keywords: * Branch: ---------------------------------------- The `comment` field for `user` resources can often contain non-ASCII characters. Unfortunately, Puppet retrieves the existing value (`current_value`) as ASCII-8BIT, but strings containing non-ASCII characters are automatically turned into UTF-8, resulting in a failure to concatenate the strings in `change_to_s`, with messages such as the following in Puppet 3.2.4 with Ruby 1.9.3: <pre> Error: Could not convert change 'comment' to string: incompatible character encodings: ASCII-8BIT and UTF-8 Error: Could not convert change 'comment' to string: incompatible character encodings: ASCII-8BIT and UTF-8 Error: /User[rpinson]: Could not evaluate: Puppet::Util::Log requires a message </pre> which is due to the fact that `current_value` is encoded in ASCII-8BIT, but `newvalue` is in UTF-8 and not "softly" convertible when reaching `change_to_s` in `property.rb`. -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
