module RFC2047
Defined in:
rfc2047.crConstant Summary
-
ADJACENT_WORDS =
/(#{WORD})[\s\r\n]+(?==\?(\2)\?([BbQq])\?)/
-
Look for two adjacent words in the same encoding.
-
WORD =
/=\?([!#$\%&'*+-\/0-9A-Z\\^\`a-z{|}~]+)\?([BbQq])\?([!->@-~]+)\?=/
Class Method Summary
-
.decode(from : String, target : String = "utf-8")
Decodes a string, +from+, containing RFC 2047 encoded words into a target character set, +target+ defaulting to utf-8.
Class Method Detail
def self.decode(from : String, target : String = "utf-8")
#
Decodes a string, +from+, containing RFC 2047 encoded words into a target character set, +target+ defaulting to utf-8. See iconv_open(3) for information on the supported target encodings. If one of the encoded words cannot be converted to the target encoding, it is left in its encoded form.