You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ma...@apache.org on 2011/09/28 10:18:57 UTC

svn commit: r1176780 - /poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java

Author: maxcom
Date: Wed Sep 28 08:18:57 2011
New Revision: 1176780

URL: http://svn.apache.org/viewvc?rev=1176780&view=rev
Log:
bug#51901: StringChunk.parseAs7BitData - Encoding not found - US-ASCII; format=flowed

Modified:
    poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java?rev=1176780&r1=1176779&r2=1176780&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java Wed Sep 28 08:18:57 2011
@@ -363,7 +363,8 @@ public class MAPIMessage extends POIDocu
          String[] headers = getHeaders();
          if(headers != null && headers.length > 0) {
             // Look for a content type with a charset
-            Pattern p = Pattern.compile("Content-Type:.*?charset=[\"']?(.*?)[\"']?");
+            Pattern p = Pattern.compile("Content-Type:.*?charset=[\"']?([^;'\"]+)[\"']?", Pattern.CASE_INSENSITIVE);
+
             for(String header : headers) {
                if(header.startsWith("Content-Type")) {
                   Matcher m = p.matcher(header);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org