Fixed bug #12825: Wrong encoding of labels in t3editor
authorOliver Hader <oliver.hader@typo3.org>
Sun, 29 Nov 2009 15:48:33 +0000 (15:48 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sun, 29 Nov 2009 15:48:33 +0000 (15:48 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6583 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/t3editor/class.tx_t3editor.php

index fd306f9..964cd24 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -20,6 +20,7 @@
        * Fixed bug #11345: Uncaught exception InvalidArgumentException on creating graphical menus
        * Fixed bug #12489: IRRE - Problem with clearing of floated elements in IE
        * Fixed bug #12788: Recycler does not show up
+       * Fixed bug #12825: Wrong encoding of labels in t3editor
 
 2009-11-26  Francois Suter  <francois@typo3.org>
 
index 2f62b44..790aca0 100755 (executable)
@@ -170,10 +170,14 @@ class tx_t3editor {
         * @return      array           The labels to be used in JavaScript
         */
        protected function getJavaScriptLabels() {
-               $coreLabels = array(
-               );
-               $extensionLabels = $this->getJavaScriptLabelsFromLocallang('js.', 'label_');
-               return array_merge($coreLabels, $extensionLabels);
+               $javaScriptLabels = $this->getJavaScriptLabelsFromLocallang('js.', 'label_');
+
+                       // Convert labels back to UTF-8 since json_encode() only works with UTF-8:
+               if ($GLOBALS['LANG']->charSet !== 'utf-8') {
+                       $GLOBALS['LANG']->csConvObj->convArray($javaScriptLabels, $GLOBALS['LANG']->charSet, 'utf-8');
+               }
+
+               return $javaScriptLabels;
        }
 
        /**