Fixed bug 4820: IRRE - Wrong character encoding in AJAX response
authorOliver Hader <oliver.hader@typo3.org>
Wed, 24 Jan 2007 12:47:35 +0000 (12:47 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 24 Jan 2007 12:47:35 +0000 (12:47 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1931 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms_inline.php
typo3/alt_doc_ajax.php

index 0484b63..65283e2 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-01-24  Oliver Hader  <oh@inpublica.de>
+
+       * Fixed bug 4820: IRRE - Wrong character encoding in AJAX response
+
 2007-01-23  Ingmar Schlecht  <ingmar@typo3.org>
 
        * Bugfix to mm-relation handling: writeMM() tried to set the "tablenames" field even for simple two-table relationships which then failed
index cf6771c..0efbaa3 100755 (executable)
@@ -748,6 +748,9 @@ class t3lib_TCEforms_inline {
                        return $this->getJSON($jsonArray);
                }
 
+                       // Encode TCEforms AJAX response with utf-8:
+               $item = $GLOBALS['LANG']->csConvObj->utf8_encode($item, $GLOBALS['LANG']->charSet);
+
                if (!$current['uid']) {
                        $jsonArray = array(
                                'data'  => $item,
index 17cfae4..9e10972 100755 (executable)
@@ -122,6 +122,7 @@ class SC_alt_doc_ajax {
                header('Last-Modified: '.gmdate("D, d M Y H:i:s").' GMT');
                header('Cache-Control: no-cache, must-revalidate');
                header('Pragma: no-cache');
+               header('Content-type: text/javascript; charset=utf-8');
 
                $this->content = '';