Allow import of non-UTF-8 SQL files.

This commit is contained in:
Alexander M. Turek
2004-09-21 10:28:13 +00:00
parent 91b6f4c225
commit cfc06973fc
4 changed files with 30 additions and 5 deletions

View File

@@ -183,7 +183,7 @@ if (!empty($cfg['UploadDir'])) {
} // end if (web-server upload directory)
// Charset conversion options
if ($is_upload || $is_upload_dir) {
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
if (PMA_MYSQL_INT_VERSION < 40100 && $cfg['AllowAnywhereRecoding'] && $allow_recoding) {
echo ' <tr bgcolor="' .$cfg['BgcolorTwo'] . '"><td>' . "\n";
$temp_charset = reset($cfg['AvailableCharsets']);
echo '&nbsp;' . $strCharsetOfFile . "\n"
@@ -204,6 +204,13 @@ if ($is_upload || $is_upload_dir) {
echo ' </td>' . "\n";
echo ' <td align="right"><input type="submit" name="SQL" value="' . $strGo . '" /></td>' . "\n";
echo ' </tr>' . "\n";
} elseif (PMA_MYSQL_INT_VERSION >= 40100) {
echo ' <tr bgcolor="' .$cfg['BgcolorTwo'] . '"><td>' . "\n"
. $strCharsetOfFile . "\n";
echo PMA_generateCharsetDropdownBox(PMA_CSDROPDOWN_CHARSET, 'charset_of_file', NULL, FALSE);
echo ' </td>' . "\n";
echo ' <td align="right"><input type="submit" name="SQL" value="' . $strGo . '" /></td>' . "\n";
echo ' </tr>' . "\n";
}else{
echo ' <tr bgcolor="' . $cfg['BgcolorTwo'] . '"><td align="right" colspan="2"><input type="submit" name="SQL" value="' . $strGo . '" /></td></tr>' . "\n\n";
} // end if (recoding)