From e1deb2c1970f7e0f95eef4f9464f59c36eaa848e Mon Sep 17 00:00:00 2001 From: Maxim Valyanskiy Date: Mon, 19 Sep 2011 09:34:52 +0000 Subject: [PATCH] MAPIMessage: skip UTF-8 in guess7bitEncoding because UTF-8 are never used as one-byte encoding in Outlook git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1172537 13f79535-47bb-0310-9956-ffa450edef68 --- src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java b/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java index b105c8b4e6..1f31c086c5 100644 --- a/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java +++ b/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java @@ -370,7 +370,10 @@ public class MAPIMessage extends POIDocument { if(m.matches()) { // Found it! Tell all the string chunks String charset = m.group(1); - set7BitEncoding(charset); + + if (!charset.equalsIgnoreCase("utf-8")) { + set7BitEncoding(charset); + } return; } } -- 2.39.5