-
Bug
-
Resolution: Fixed
-
Minor
-
2.3.2
-
MOODLE_23_STABLE
-
MOODLE_22_STABLE, MOODLE_23_STABLE
-
MDL-35412-master -
Opening this issue to investigate and fix the following reported by Yamashita Kōichi on MDL-35171.
Since Moodle 2.3.2, "json_encode(): Invalid UTF-8 sequence in argument" occurs when editing quizzes etc., on Windows servers with some locales (e.g. Japanese). Changing the code in formslib like below fixes that.
'mon' => userdate(strtotime("Monday"), '%a'), // 5th Jan 1970 at 12pm
'january' => userdate(strtotime("January"), '%B'), // 1st Jan 1970 at 12pmMy environment is: Moodle 2.3.2, Windows 7, IIS 7.5, PHP 5.3.14 Zend Server, debug is set to DEVELOPER.
I get errors when editing a quiz (date selector is used for Timing > Open/Close the quiz), in some locales (en is OK but ja, fr, de all have errors).
strftime can return results only in multibyte encoding on Windows so we need to convert back to UTF-8 for use in moodle. (userdate() in moodlelib.php does that.)
- has been marked as being related by
-
MDL-33545 userdate() returns corrupted string on Windows environment (patch) (backport of MDL-32632)
- Closed
- Testing discovered
-
MDL-35171 Date Picker displays incorrect Month for Months with less than 31 days
- Closed
- will help resolve
-
MDL-35929 Datetime picker - month with special caracters outputed as "Null"
- Closed