summaryrefslogtreecommitdiff
path: root/lib/feed2imap/textconverters.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/feed2imap/textconverters.rb')
-rw-r--r--lib/feed2imap/textconverters.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/feed2imap/textconverters.rb b/lib/feed2imap/textconverters.rb
index b28c211..be63173 100644
--- a/lib/feed2imap/textconverters.rb
+++ b/lib/feed2imap/textconverters.rb
@@ -95,4 +95,15 @@ class String
return self
end
end
+
+ def needMIME
+ utf8 = false
+ self.unpack('U*').each do |c|
+ if c > 127
+ utf8 = true
+ break
+ end
+ end
+ utf8
+ end
end