diff --git a/lib/mail/utilities.rb b/lib/mail/utilities.rb index 532fba44a..6db437c32 100644 --- a/lib/mail/utilities.rb +++ b/lib/mail/utilities.rb @@ -526,6 +526,10 @@ def Utilities.pick_encoding(charset) when 'latin2' Encoding::ISO_8859_2 + # Microsoft-specific alias for CP950 (Traditional Chinese) + when 'ms950' + Encoding::CP950 + else charset end diff --git a/spec/mail/encoding_spec.rb b/spec/mail/encoding_spec.rb index d8c262a15..6dc700fed 100644 --- a/spec/mail/encoding_spec.rb +++ b/spec/mail/encoding_spec.rb @@ -206,6 +206,7 @@ "latin2" => Encoding::ISO_8859_2, "ISO_8859-1" => Encoding::ISO_8859_1, "cp-850" => Encoding::CP850, + "MS950" => Encoding::CP950, "" => Encoding::BINARY }.each do |from, to| it "should support #{from}" do