File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -629,12 +629,14 @@ protected function header2fileinfo($header)
629629 * similar enough. CP437 seems not to be available in mbstring. Lastly falls back to keeping the
630630 * string as is, which is still better than nothing.
631631 *
632+ * On some systems iconv is available, but the codepage is not. We also check for that.
633+ *
632634 * @param $string
633635 * @return string
634636 */
635637 protected function cpToUtf8 ($ string )
636638 {
637- if (function_exists ('iconv ' )) {
639+ if (function_exists ('iconv ' ) && @ iconv_strlen ( '' , ' CP437 ' ) !== false ) {
638640 return iconv ('CP437 ' , 'UTF-8 ' , $ string );
639641 } elseif (function_exists ('mb_convert_encoding ' )) {
640642 return mb_convert_encoding ($ string , 'UTF-8 ' , 'CP850 ' );
You can’t perform that action at this time.
0 commit comments