- Fixed #ZETACOMP-75: Mail parser doesn't understand uppercase "CHARSET" that
alpine uses.
git-svn-id: https://svn.apache.org/repos/asf/incubator/zetacomponents/trunk@1093987 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/Mail/ChangeLog b/Mail/ChangeLog
index 2e69b3e..00f5a0e 100644
--- a/Mail/ChangeLog
+++ b/Mail/ChangeLog
@@ -8,6 +8,8 @@
the path fails.
- Fixed #16470: Mail test suite causes fatal errors because of transport
errors in destructor.
+- Fixed #ZETACOMP-75: Mail parser doesn't understand uppercase "CHARSET" that
+ alpine uses.
1.7 - Monday 21 December 2009
diff --git a/Mail/src/parser/parts/text_parser.php b/Mail/src/parser/parts/text_parser.php
index c8be3e6..5840c5a 100644
--- a/Mail/src/parser/parts/text_parser.php
+++ b/Mail/src/parser/parts/text_parser.php
@@ -95,7 +95,7 @@
$charset = "us-ascii"; // RFC 2822 default
if ( isset( $this->headers['Content-Type'] ) )
{
- preg_match( '/\s*charset\s?=\s?"?([^;"\s]*);?/',
+ preg_match( '/\s*charset\s?=\s?"?([^;"\s]*);?/i',
$this->headers['Content-Type'],
$parameters );
if ( count( $parameters ) > 0 )