[TASK] Remove FlexForm charset conversion 28/46628/2
authorBenni Mack <benni@typo3.org>
Fri, 12 Feb 2016 17:16:49 +0000 (18:16 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Fri, 12 Feb 2016 17:38:53 +0000 (18:38 +0100)
There was a rare option before all DB code
was UTF-8 and BE was UTF-8, when
FlexForm XML was stored in a different charset.

The additional evaluation needs to be enabled
and was never enabled in the last versions.

The property is removed.

Resolves: #73383
Releases: master
Change-Id: Ieba9b06c977dd938e439a9cfe66d63015eb488c8
Reviewed-on: https://review.typo3.org/46628
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jan Helke <typo3@helke.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/core/Classes/Configuration/FlexForm/FlexFormTools.php

index 8116712..882ce90 100644 (file)
@@ -22,13 +22,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
  */
 class FlexFormTools
 {
-    /**
-     * If set, the charset of data XML is converted to system charset.
-     *
-     * @var bool
-     */
-    public $convertCharset = false;
-
     /**
      * If set, section indexes are re-numbered before processing
      *
@@ -104,17 +97,8 @@ class FlexFormTools
         $dataStructArray = BackendUtility::getFlexFormDS($GLOBALS['TCA'][$table]['columns'][$field]['config'], $row, $table, $field);
         // If data structure was ok, proceed:
         if (is_array($dataStructArray)) {
-            // Get flexform XML data:
-            $xmlData = $row[$field];
-            // Convert charset:
-            if ($this->convertCharset) {
-                $xmlHeaderAttributes = GeneralUtility::xmlGetHeaderAttribs($xmlData);
-                $storeInCharset = strtolower($xmlHeaderAttributes['encoding']);
-                if ($storeInCharset) {
-                    $xmlData = $GLOBALS['LANG']->csConvObj->conv($xmlData, $storeInCharset, 'utf-8', 1);
-                }
-            }
-            $editData = GeneralUtility::xml2array($xmlData);
+            // Get flexform XML data
+            $editData = GeneralUtility::xml2array($row[$field]);
             if (!is_array($editData)) {
                 return 'Parsing error: ' . $editData;
             }