Skip to content

Commit

Permalink
support MS950 encoding
Browse files Browse the repository at this point in the history
close #1406
  • Loading branch information
tonytonyjan committed Dec 3, 2022
1 parent c9ea62c commit 068a7d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mail/utilities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions spec/mail/encoding_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 068a7d7

Please sign in to comment.