lib/sup/rfc2047.rb in sup-0.13.2.1 vs lib/sup/rfc2047.rb in sup-0.14.0
- old
+ new
@@ -14,12 +14,10 @@
#
# Copyright (c) Sam Roberts <sroberts / uniserve.com> 2004
#
# This file is distributed under the same terms as Ruby.
-require 'iconv'
-
module Rfc2047
WORD = %r{=\?([!\#$%&'*+-/0-9A-Z\\^\`a-z{|}~]+)\?([BbQq])\?([!->@-~]+)\?=} # :nodoc: 'stupid ruby-mode
WORDSEQ = %r{(#{WORD.source})\s+(?=#{WORD.source})}
def Rfc2047.is_encoded? s; s =~ WORD end
@@ -50,9 +48,9 @@
# Don't need an else, because no other values can be matched in a
# WORD.
end
- Iconv.easy_decode(target, charset, text)
+ text.transcode(target, charset)
end
end
end