summaryrefslogtreecommitdiff
path: root/lib/feed2imap/textconverters.rb
diff options
context:
space:
mode:
authorlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2005-04-11 21:10:08 +0000
committerlnu <lnu@f70e237a-67f3-0310-a06c-d2b8a7116972>2005-04-11 21:10:08 +0000
commit2c7a9e22507ea4ac37d3a01812c277efd067725e (patch)
tree8ae79f1bbacfc1790a3acda79e7fc5aee7947b2a /lib/feed2imap/textconverters.rb
parentb4fc05daee9e8d9703316cf736100236a2c6cb93 (diff)
downloadfeed2imap-2c7a9e22507ea4ac37d3a01812c277efd067725e.tar.gz
feed2imap-2c7a9e22507ea4ac37d3a01812c277efd067725e.tar.bz2
feed2imap-2c7a9e22507ea4ac37d3a01812c277efd067725e.zip
finally fixed encoding issues
git-svn-id: svn+ssh://svn.gna.org/svn/feed2imap/trunk/feed2imap@18 f70e237a-67f3-0310-a06c-d2b8a7116972
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