Skip to content
Browse files

added windows-XXXX encoding "tolerance"

  • Loading branch information...
1 parent 589fc9f commit e0424830d8459e392898b1cff4888aae2a0288ee luis committed Dec 23, 2010
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/mail/version_specific/ruby_1_9.rb
  2. +1 −1 spec/mail/field_spec.rb
View
2 lib/mail/version_specific/ruby_1_9.rb
@@ -97,7 +97,7 @@ def Ruby19.fix_encoding(encoding)
# utf-8 and alike
when /utf-?(.*)/i then return "UTF-#{$1}"
# Windows-1252 and alike
- #~ when /Windows-?(.*)/i then return "Windows-#{$1}"
+ when /Windows-?(.*)/i then return "Windows-#{$1}"
#more aliases to be added if needed
else return encoding
end
View
2 spec/mail/field_spec.rb
@@ -235,7 +235,7 @@
it "more tolerable to encoding definitions, Windows (issue 120)" do
next if RUBY_VERSION < '1.9'
- subject = Mail::SubjectField.new("=?Windows-1252?Q?It=92s_a_test=3F?=", 'utf-8')
+ subject = Mail::SubjectField.new("=?Windows1252?Q?It=92s_a_test=3F?=", 'utf-8')
subject.decoded.should == "It’s a test?"
end
end

0 comments on commit e042483

Please sign in to comment.
Something went wrong with that request. Please try again.