REXML and missing iconv

If You are parsing XML with Ruby, You probably have been using REXML to parse it. Well yesterday I was faced with error left by REXML:

/usr/local/lib/ruby/1.8/rexml/parsers/treeparser.rb:90:in
`parse': No decoder found for encoding ISO-8859-2.  Please install iconv.>
(REXML::ParseException)

I was a bit surprised, since it was on FreeBSD box, which have installed iconv by default.

Solution is very simple – REXML was complaining about missing iconv gem! On FreeBSD it means You have install /usr/ports/converters/ruby-iconv.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.