MDL-22050 dear 'thischarset', we did not need you since 1.7, time to say good bye...
authorPetr Skoda <skodak@moodle.org>
Sat, 10 Apr 2010 18:20:54 +0000 (18:20 +0000)
committerPetr Skoda <skodak@moodle.org>
Sat, 10 Apr 2010 18:20:54 +0000 (18:20 +0000)
install/stringnames.txt
lang/en/langconfig.php
lang/en/moodle.php
lib/moodlelib.php
mod/feedback/easy_excel.php
mod/feedback/export.php
mod/hotpot/report/default.php
mod/hotpot/view.php

index 011b83b..bb1ef71 100644 (file)
@@ -46,7 +46,6 @@ phpversion,install
 phpversionhelp,install
 previous,moodle
 reload,admin
-thischarset,langconfig
 thisdirection,langconfig
 thislanguage,langconfig
 welcomep10,install
index c377812..6af73c5 100644 (file)
@@ -46,6 +46,5 @@ $string['strftimerecent'] = '%d %b, %H:%M';
 $string['strftimerecentfull'] = '%a, %d %b %Y, %I:%M %p';
 $string['strftimetime'] = '%I:%M %p';
 $string['thisdirection'] = 'ltr';
-$string['thischarset'] = 'UTF-8';
 $string['thislanguage'] = 'English';
 $string['thousandssep'] = ',';
index a22a6a9..1870d37 100644 (file)
@@ -1644,7 +1644,6 @@ $string['themesaved'] = 'New theme saved';
 $string['thereareno'] = 'There are no {$a} in this course';
 $string['thiscategorycontains'] = 'This category contains';
 $string['thisdirection'] = 'ltr';
-$string['thischarset'] = 'UTF-8';
 $string['thislanguage'] = 'English';
 $string['time'] = 'Time';
 $string['timezone'] = 'Timezone';
index aff74b4..e9449eb 100644 (file)
@@ -5859,7 +5859,7 @@ class amos_string_manager implements string_manager {
         static $langconfigstrs = array('alphabet' => 1, 'backupnameformat' => 1, 'decsep' => 1,
                 'firstdayofweek' => 1, 'listsep' => 1, 'locale' => 1, 'localewin' => 1,
                 'localewincharset' => 1, 'oldcharset' => 1, 'parentlanguage' => 1,
-                'thischarset' => 1, 'thisdirection' => 1, 'thislanguage' => 1, 'thousandssep' => 1,
+                'thisdirection' => 1, 'thislanguage' => 1, 'thousandssep' => 1,
 
                 'strftimedate' => 1,
                 'strftimedatefullshort' => 1,
index 8a0a89f..acafbcc 100644 (file)
@@ -230,7 +230,6 @@ function feedback_convert_to_win($text) {
     global $CFG;
     static $textlib;
     static $newwincharset;
-    static $oldcharset;
 
     if(!isset($textlib)) {
         $textlib = textlib_get_instance();
@@ -247,15 +246,11 @@ function feedback_convert_to_win($text) {
         }
     }
 
-    if(!isset($oldcharset)) {
-        $oldcharset = get_string('thischarset');
-    }
-
     //converting <br /> into newline
     $newtext = str_ireplace('<br />', "\n", $text);
     $newtext = str_ireplace('<br>', "\n", $newtext);
 
-    return $textlib->convert($newtext, $oldcharset, $newwincharset);
+    return $textlib->convert($newtext, 'UTF-8', $newwincharset);
 }
 
 
index 2ba215a..973e824 100644 (file)
@@ -103,7 +103,6 @@ function feedback_get_xml_data($feedbackid) {
 }
 
 function feedback_send_xml_data($data, $filename) {
-    $charset = get_string('thischarset');
     @header('Content-Type: application/xml; charset=UTF-8');
     @header('Content-Disposition: attachment; filename='.$filename);
     print($data);
index a11a1a6..37f1a97 100644 (file)
@@ -814,7 +814,7 @@ class hotpot_default_report {
                         $in_charset = mb_detect_encoding($cell, 'auto');
                     }
                     if (empty($in_charset)) {
-                        $in_charset = get_string('thischarset');
+                        $in_charset = 'UTF-8';
                     }
                     if ($in_charset != 'ASCII' && function_exists('mb_convert_encoding')) {
                         $cell = mb_convert_encoding($cell, $options['reportencoding'], $in_charset);
index f930c19..64af295 100644 (file)
         case HOTPOT_NAVIGATION_GIVEUP:
             // replace charset , if necessary
             // HotPots are plain ascii (iso-8859-1) with unicode chars encoded as HTML entities
-            $charset = get_string("thischarset");
-            if ($charset == 'iso-8859-1') {
-                // do nothing
-            } else {
-                $hp->html = preg_replace(
-                    '|<meta[^>]*charset=iso-8859-1[^>]*>|is',
-                    '<meta http-equiv="Content-Type" content="text/html; charset='.$charset.'" />',
-                    $hp->html
-                );
-            }
+            $hp->html = preg_replace(
+                '|<meta[^>]*charset=iso-8859-1[^>]*>|is',
+                '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',
+                $hp->html
+            );
             // no break (continue to print html to browser)
         default:
             // HOTPOT_NAVIGATION_BUTTONS