Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-37407 add support for zh_cn unicode unzip

  • Loading branch information...
commit 401dc3dbb9089e2266591d80f3d3c90f6aff5cbb 1 parent df93b15
@skodak skodak authored
Showing with 7 additions and 0 deletions.
  1. +7 −0 lib/filestorage/zip_archive.php
View
7 lib/filestorage/zip_archive.php
@@ -544,6 +544,13 @@ protected function init_namelookup() {
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');
Please sign in to comment.
Something went wrong with that request. Please try again.