[BUGFIX] Fix checking config.metaCharset with uppercase letters
[Packages/TYPO3.CMS.git] / typo3 / sysext / indexed_search / Classes / FileContentParser.php
index da964e9..d31e2a8 100644 (file)
@@ -660,7 +660,7 @@ class FileContentParser
                 $fileContent = GeneralUtility::getUrl($absFile);
                 // Finding charset:
                 preg_match('/^[[:space:]]*<\\?xml[^>]+encoding[[:space:]]*=[[:space:]]*["\'][[:space:]]*([[:alnum:]_-]+)[[:space:]]*["\']/i', substr($fileContent, 0, 200), $reg);
-                $charset = $reg[1] ?: 'utf-8';
+                $charset = $reg[1] ? trim(strtolower($reg[1])) : 'utf-8';
                 // Converting content:
                 $fileContent = $this->pObj->convertHTMLToUtf8(strip_tags(str_replace('<', ' <', $fileContent)), $charset);
                 $contentArr = $this->pObj->splitRegularContent($fileContent);