Merge branch 'w04_MDL-37407_m25_chineseunzip' of git://github.com/skodak/moodle

This commit is contained in:
Sam Hemelryk 2013-01-28 13:32:09 +13:00
commit 0449f2e6da

View File

@ -610,6 +610,13 @@ class zip_archive extends file_archive {
case 'ISO-8859-6': $encoding = 'CP720'; break;
case 'ISO-8859-7': $encoding = 'CP737'; break;
case 'ISO-8859-8': $encoding = 'CP862'; break;
case 'UTF-8':
if ($winchar = get_string('localewincharset', 'langconfig')) {
// Most probably works only for zh_cn,
// if there are more problems we could add zipcharset to langconfig files.
$encoding = $winchar;
}
break;
}
}
$newname = @textlib::convert($name, $encoding, 'utf-8');