You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-ruby/mail/files/mail-2.5.3-utf8-ruby18.patch

22 lines
634 B

commit 819c4767cea5c8523938b27a29e48a7ab82b503d
Author: kennyj <kennyj@gmail.com>
Date: Fri Nov 30 00:22:08 2012 +0900
Fix build on Ruby18. We should specify endian for UTF16/32.
diff --git a/lib/mail/version_specific/ruby_1_8.rb b/lib/mail/version_specific/ruby_1_8.rb
index cb2bae6..f7c65bb 100644
--- a/lib/mail/version_specific/ruby_1_8.rb
+++ b/lib/mail/version_specific/ruby_1_8.rb
@@ -107,6 +107,10 @@ module Mail
case encoding.upcase
when 'UTF8'
'UTF-8'
+ when 'UTF16', 'UTF-16'
+ 'UTF-16BE'
+ when 'UTF32', 'UTF-32'
+ 'UTF-32BE'
else
encoding
end