class Mail::Message

def charset

Returns the character set defined in the content type field
def charset
  if @header
    has_content_type? && !multipart? ? content_type_parameters['charset'] : @charset
  else
    @charset
  end
end