Skip to content

Commit

Permalink
Remove previous fix - see comments at aquasync#5 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
crowbot committed Nov 3, 2015
1 parent 5a86dfa commit cf05f4b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
5 changes: 0 additions & 5 deletions lib/mapi/property_set.rb
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,6 @@ def body_html
end
end
end
if @body_html && @body_html.respond_to?(:encoding)
@body_html.force_encoding("utf-8")
@body_html = @body_html.valid_encoding? ? @body_html : @body_html.encode("utf-16le", :invalid => :replace, :replace => "").encode("utf-8")
end
@body_html
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/test_msg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ def test_blammo
end


def test_rtf_to_html_returns_valid_utf8
def test_rtf_to_html_returns_ascii_8bit
msg = Mapi::Msg.open "#{TEST_DIR}/multipart-with-html.msg" do |msg|
assert_equal 1, msg.recipients.length
assert_equal 3, msg.attachments.length
html_part = msg.to_mime.parts[0].parts[1].to_s
if html_part.respond_to?(:encoding)
assert_equal 'UTF-8', html_part.encoding.to_s
assert_equal 'ASCII-8BIT', html_part.encoding.to_s
assert html_part.valid_encoding?
end
end
Expand Down

0 comments on commit cf05f4b

Please sign in to comment.