mirror of
https://github.com/splitbrain/php-archive.git
synced 2025-01-17 13:38:26 +01:00
fixed that iconv workaround
had a little logic error there - need to preserve the original string to retry the encoding a second time
This commit is contained in:
parent
aa9ae83c80
commit
735029407f
@ -655,9 +655,9 @@ class Zip extends Archive
|
||||
{
|
||||
// try iconv first
|
||||
if (function_exists('iconv')) {
|
||||
$string = @iconv('UTF-8', 'CP437//IGNORE', $string);
|
||||
$conv = @iconv('UTF-8', 'CP437//IGNORE', $string);
|
||||
if($conv) return $conv; // it worked
|
||||
}
|
||||
if($string) return $string; // it worked
|
||||
|
||||
// still here? iconv failed to convert the string. Try another method
|
||||
// see http://php.net/manual/en/function.iconv.php#108643
|
||||
|
Loading…
x
Reference in New Issue
Block a user