Skip to content

Commit 9d5342b

Browse files
committed
support MS950 encoding
close #1406
1 parent 8fbb17d commit 9d5342b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/mail/version_specific/ruby_1_9.rb

+4
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ def Ruby19.pick_encoding(charset)
236236
when 'latin2'
237237
Encoding::ISO_8859_2
238238

239+
# Microsoft-specific alias for CP950 (Traditional Chinese)
240+
when 'ms950'
241+
Encoding::CP950
242+
239243
else
240244
charset
241245
end

spec/mail/encoding_spec.rb

+1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@
207207
"latin2" => Encoding::ISO_8859_2,
208208
"ISO_8859-1" => Encoding::ISO_8859_1,
209209
"cp-850" => Encoding::CP850,
210+
"MS950" => Encoding::CP950,
210211
"" => Encoding::BINARY
211212
}.each do |from, to|
212213
it "should support #{from}" do

0 commit comments

Comments
 (0)