Skip to content

Commit cf05f4b

Browse files
committed
Remove previous fix - see comments at aquasync#5 (comment)
1 parent 5a86dfa commit cf05f4b

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

lib/mapi/property_set.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,11 +282,6 @@ def body_html
282282
end
283283
end
284284
end
285-
if @body_html && @body_html.respond_to?(:encoding)
286-
@body_html.force_encoding("utf-8")
287-
@body_html = @body_html.valid_encoding? ? @body_html : @body_html.encode("utf-16le", :invalid => :replace, :replace => "").encode("utf-8")
288-
end
289-
@body_html
290285
end
291286
end
292287
end

test/test_msg.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ def test_blammo
2626
end
2727

2828

29-
def test_rtf_to_html_returns_valid_utf8
29+
def test_rtf_to_html_returns_ascii_8bit
3030
msg = Mapi::Msg.open "#{TEST_DIR}/multipart-with-html.msg" do |msg|
3131
assert_equal 1, msg.recipients.length
3232
assert_equal 3, msg.attachments.length
3333
html_part = msg.to_mime.parts[0].parts[1].to_s
3434
if html_part.respond_to?(:encoding)
35-
assert_equal 'UTF-8', html_part.encoding.to_s
35+
assert_equal 'ASCII-8BIT', html_part.encoding.to_s
3636
assert html_part.valid_encoding?
3737
end
3838
end

0 commit comments

Comments
 (0)