class MailParser::ConvCharset

Constants

CHARSET

Public Class Methods

conv_charset(from, to, str) click to toggle source
# File lib/mailparser/conv_charset.rb, line 18
def self.conv_charset(from, to, str)
  from = CHARSET[from.downcase] || from.downcase
  to = CHARSET[to.downcase] || to.downcase
  str.encode(to, from, :invalid=>:replace, :undef=>:replace, :replace=>'?')
end