mirror of
https://github.com/splitbrain/php-archive.git
synced 2025-07-16 04:16:28 +02: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:
@ -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
|
||||
|
Reference in New Issue
Block a user