和田@NTTデータエンジニアリングシステムズと申します。
Moodle 1.6 を Windows の IIS 上で実行した際、
カレンダー等の日付表示部分に文字化けを確認しましたので、
報告させていただきます。
(1) 現象
カレンダーの年月表示の "年" や "月" に文字化けが発生する。
(2) 実行環境
Windows XP, 2000
PHP 5.1.4
Moodle 1.6(ja_utf8 言語パッケージ使用)
(3) 原因
lib/moodlelib.php ファイル userdate 関数の return 直前の if 文の処理で、
元が UTF-8 の文字列を Shift_JIS から UTF-8 へ変換するためと考えています。
(4) 回避策
lib/moodlelib.php ファイルの 951行目から 956行目までを
下記のようにコメントアウトする事で文字化けが 発生しなくなります。
/*
if (!empty($CFG->unicodedb) && $CFG->ostype == 'WINDOWS') {
if ($localewincharset = get_string('localewincharset')) {
$textlib = textlib_get_instance();
$datestring = $textlib->convert($datestring, $localewincharset, current_charset());
}
}
*/
if (!empty($CFG->unicodedb) && $CFG->ostype == 'WINDOWS') {
if ($localewincharset = get_string('localewincharset')) {
$textlib = textlib_get_instance();
$datestring = $textlib->convert($datestring, $localewincharset, current_charset());
}
}
*/