The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #15190

iconv will be deprecated, used in pson/json_pure lib

Added by Dominic Cleal almost 4 years ago. Updated over 3 years ago.

Status:ClosedStart date:06/24/2012
Priority:NormalDue date:
Assignee:-% Done:


Target version:3.0.0
Affected Puppet version:2.7.17 Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


While running Puppet on Fedora 17 with ruby 1.9.3p194, there are many warnings printed by ruby:

/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.

This seems to be caused by the pson (json_pure) library in lib/puppet/external/pson/pure.rb, that still uses iconv:

module PSON
    require 'iconv'
    # An iconv instance to convert from UTF8 to UTF16 Big Endian.
    UTF16toUTF8 ='utf-8', 'utf-16be') # :nodoc:

This can be shown by changing the require line so the iconv library doesn’t load (forcing the rescue path), then the deprecation warnings disappear.

Originally filed in Fedora as #809911.

Related issues

Duplicated by Puppet - Bug #20587: [Debian 7 Wheezy] custom_require.rb:36:in `require': icon... Duplicate


#1 Updated by eric sorenson over 3 years ago

  • Status changed from Unreviewed to Accepted
  • Assignee set to Anonymous

Hey, we were just talking about 1.9.x support.

#2 Updated by Ben Hughes over 3 years ago

This hit me last week, when I was trying to use puppet parser validate under ruby 1.9.3… Can I help with this?

#3 Updated by Anonymous over 3 years ago

This is a really interesting issue the encoding translation changed between ruby 1.8 and ruby 1.9 from iconv to String#encode. The iconv code is used for UTF-8 to UTF-16 translation and for UTF-16 to UTF-8 translation, but I can only find a use of the UTF-16 to UTF-8. With some refactoring a lot of this might just disappear and leave something that we can easily make a shim for supporting both versions of ruby.

#4 Updated by Anonymous over 3 years ago

This was dealt with in the json/pure code with

#5 Updated by Anonymous over 3 years ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Assignee deleted (Anonymous)
  • Branch set to

#6 Updated by Josh Cooper over 3 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release
  • Target version set to 3.0.0

Merged into 3.x in commit ed45ae8daa7ee929f59fe4502642483becd9a59e

#7 Updated by Moses Mendoza over 3 years ago

  • Status changed from Merged - Pending Release to Closed

released in 3.0.0-rc7

Also available in: Atom PDF