Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/feed2imap/itemtomail.rb

Instance Method Summary collapse

Instance Method Details

#needMIMEObject



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/feed2imap/itemtomail.rb', line 34

def needMIME
  utf8 = false
  begin
    self.unpack('U*').each do |c|
      if c > 127
        utf8 = true
        break
      end
    end
  rescue
    # safe fallback in case of problems
    utf8 = true
  end
  utf8
end