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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to