This function is not used anywhere.
This commit is contained in:
@@ -84,49 +84,4 @@ function PMA_convert_string($src_charset, $dest_charset, $what) {
|
||||
}
|
||||
} // end of the "PMA_convert_string()" function
|
||||
|
||||
|
||||
/**
|
||||
* Converts encoding of file according to parameters with detected
|
||||
* conversion function. The old file will be unlinked and new created and
|
||||
* its file name is returned.
|
||||
*
|
||||
* @param string source charset
|
||||
* @param string target charset
|
||||
* @param string file to convert
|
||||
*
|
||||
* @return string new temporay file
|
||||
*
|
||||
* @access public
|
||||
*
|
||||
*/
|
||||
function PMA_convert_file($src_charset, $dest_charset, $file) {
|
||||
switch ($GLOBALS['PMA_recoding_engine']) {
|
||||
case PMA_CHARSET_RECODE:
|
||||
case PMA_CHARSET_ICONV:
|
||||
$tmpfname = tempnam('', 'PMA_convert_file');
|
||||
$fin = fopen($file, 'r');
|
||||
$fout = fopen($tmpfname, 'w');
|
||||
if ($GLOBALS['PMA_recoding_engine'] == PMA_CHARSET_RECODE) {
|
||||
recode_file($src_charset . '..' . $dest_charset, $fin, $fout);
|
||||
} else {
|
||||
while (!feof($fin)) {
|
||||
$line = fgets($fin, 4096);
|
||||
if ($GLOBALS['PMA_recoding_engine'] == PMA_CHARSET_ICONV) {
|
||||
$dist = iconv($src_charset, $dest_charset . $GLOBALS['cfg']['IconvExtraParams'], $line);
|
||||
} elseif ($GLOBALS['PMA_recoding_engine'] == PMA_CHARSET_ICONV_AIX) {
|
||||
$dist = PMA_aix_iconv_wrapper($src_charset, $dest_charset . $GLOBALS['cfg']['IconvExtraParams'], $line);
|
||||
}
|
||||
fputs($fout, $dist);
|
||||
} // end while
|
||||
}
|
||||
fclose($fin);
|
||||
fclose($fout);
|
||||
unlink($file);
|
||||
|
||||
return $tmpfname;
|
||||
default:
|
||||
return $file;
|
||||
}
|
||||
} // end of the "PMA_convert_file()" function
|
||||
|
||||
?>
|
||||
|
Reference in New Issue
Block a user