Skip to content

Commit

Permalink
support MS950 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytonyjan committed Oct 15, 2020
1 parent 8fbb17d commit 9d5342b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mail/version_specific/ruby_1_9.rb
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ def Ruby19.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 @@ -207,6 +207,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 9d5342b

Please sign in to comment.