src/Zip.php
protected function utf8ToCp($string)
    {
        // try iconv first
        if (function_exists('iconv')) {
            $conv = @iconv('UTF-8', 'CP437//IGNORE', $string);
            if($conv) return $conv; // it worked
        }

        // still here? iconv failed to convert the string. Try another method
        // see http://php.net/manual/en/function.iconv.php#108643

        if (function_exists('mb_convert_encoding')) {
            return mb_convert_encoding($string, 'CP850', 'UTF-8');
        } else {
            return $string;
        }
    }
protected function utf8ToCp($string)
    {
        // try iconv first
        if (function_exists('iconv')) {
            $conv = @iconv('UTF-8', 'CP437//IGNORE', $string);
            if($conv) return $conv; // it worked
        }

        // still here? iconv failed to convert the string. Try another method
        // see http://php.net/manual/en/function.iconv.php#108643

        if (function_exists('mb_convert_encoding')) {
            return mb_convert_encoding($string, 'CP850', 'UTF-8');
        } else {
            return $string;
        }
    }
protected function utf8ToCp ( $ string ) { // try iconv first if ( function_exists ( 'iconv' ) ) { $ conv = @ iconv ( 'UTF-8' , 'CP437//IGNORE' , $ string ) ; if ( $ conv ) return $ conv ; // it worked } // still here? iconv failed to convert the string. Try another method // see http://php.net/manual/en/function.iconv.php#108643 if ( function_exists ( 'mb_convert_encoding' ) ) { return mb_convert_encoding ( $ string , 'CP850' , 'UTF-8' ) ; } else { return $ string ; } }
Convert the given UTF-8 encoded string to CP437

Same caveats as for cpToUtf8() apply

@param $string
@return string
Convert the given UTF - 8 encoded string to CP437