bug#51901: StringChunk.parseAs7BitData - Encoding not found - US-ASCII; format=flowed
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1176780 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9e1ca2caea
commit
a186e69c78
@ -363,7 +363,8 @@ public class MAPIMessage extends POIDocument {
|
|||||||
String[] headers = getHeaders();
|
String[] headers = getHeaders();
|
||||||
if(headers != null && headers.length > 0) {
|
if(headers != null && headers.length > 0) {
|
||||||
// Look for a content type with a charset
|
// 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) {
|
for(String header : headers) {
|
||||||
if(header.startsWith("Content-Type")) {
|
if(header.startsWith("Content-Type")) {
|
||||||
Matcher m = p.matcher(header);
|
Matcher m = p.matcher(header);
|
||||||
|
Loading…
Reference in New Issue
Block a user