Flowdock
def_iconv_convert(to_enc, from_enc, depth=0) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/rss/converter.rb, line 42
    def def_iconv_convert(to_enc, from_enc, depth=0)
      begin
        require "iconv"
        @iconv = Iconv.new(to_enc, from_enc)
        def_convert(depth+1) do |value|
          "begin\n@iconv.iconv(\#{value})\nrescue Iconv::Failure\nraise ConversionError.new(\#{value}, \"\#{to_enc}\", \"\#{from_enc}\")\nend\n"
        end
      rescue LoadError, ArgumentError, SystemCallError
        raise UnknownConversionMethodError.new(to_enc, from_enc)
      end
    end
Register or log in to add new notes.