Fixed bug #590863 (Importing an SQL dump fails when using UTF-8) by allowing the user to specify the charset of an uploaded SQL file.

This commit is contained in:
Alexander M. Turek
2002-08-06 21:04:02 +00:00
parent cfdde46abd
commit ccb62f3234
89 changed files with 315 additions and 178 deletions

View File

@@ -15,6 +15,9 @@ $Source$
2002-08-06 Alexander M. Turek <rabus@users.sourceforge.net>
* lang/english-*.inc.php3: Typo.
* db_details.php3, read_dump.php3, tbl_query_box.php3, lang/*.inc.php3:
Fixed bug #590863 (Importing an SQL dump fails when using UTF-8) by
allowing the user to specify the charset of an uploaded SQL file.
2002-08-05 Lo<4C>c Chapeaux <lolo@phpheaven.net>
* tbl_indexes.php3, ldi_check.php3, libraries/sqlparser.lib.php3:

View File

@@ -75,6 +75,26 @@ if ($is_upload) {
?>
<div style="margin-bottom: 5px">
<input type="file" name="sql_file" class="textfield" /><br />
<?php
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
$temp_charset = reset($cfg['AvailableCharsets']);
echo $strCharsetOfFile . "\n"
. ' <select name="charset_of_file" size="1">' . "\n"
. ' <option value="' . $temp_charset . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
while ($temp_charset = next($cfg['AvailableCharsets'])) {
echo ' <option value="' . $temp_charset . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
}
echo ' </select>';
}
?>
</div>
<?php
} // end if

View File

@@ -421,4 +421,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -422,4 +422,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -420,4 +420,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -421,4 +421,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -421,4 +421,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -420,4 +420,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -418,4 +418,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -420,4 +420,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -414,4 +414,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -415,4 +415,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -421,4 +421,5 @@ $strYes = ' 是 ';
$strZip = '"zipped"';
// To translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -420,4 +420,5 @@ $strYes = '
$strZip = '"zipped"';
// To translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -418,4 +418,5 @@ $strYes = '是';
$strZip = '"zipped"';
// To translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strYes = '
$strZip = '"zipped"';
// To translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -420,4 +420,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -420,4 +420,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -413,4 +413,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -414,4 +414,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -415,4 +415,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -416,4 +416,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -70,6 +70,7 @@ $strCarriage = 'Carriage return: \\r';
$strChange = 'Change';
$strChangeDisplay = 'Choose Field to display';
$strChangePassword = 'Change password';
$strCharsetOfFile = 'Character set of the file:';
$strCheckAll = 'Check All';
$strCheckDbPriv = 'Check Database Privileges';
$strCheckTable = 'Check table';
@@ -412,4 +413,6 @@ $strWrongUser = 'Wrong username/password. Access denied.';
$strYes = 'Yes';
$strZip = '"zipped"';
//New
?>

View File

@@ -68,9 +68,11 @@ $strCantRenameIdxToPrimary = 'Can\'t rename index to PRIMARY!';
$strCantUseRecodeIconv = 'Can not use iconv nor libiconv nor recode_string function while extension reports to be loaded. Check your php configuration.';
$strCardinality = 'Cardinality';
$strCarriage = 'Carriage return: \\r';
$strCharsetOfFile = 'Character set of the file:';
$strChange = 'Change';
$strChangeDisplay = 'Choose Field to display';
$strChangePassword = 'Change password';
$strCharsetOfFile = 'Character set of the file:';
$strCheckAll = 'Check All';
$strCheckDbPriv = 'Check Database Privileges';
$strCheckTable = 'Check table';
@@ -413,4 +415,6 @@ $strWrongUser = 'Wrong username/password. Access denied.';
$strYes = 'Yes';
$strZip = '"zipped"';
// New
?>

View File

@@ -416,4 +416,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -418,4 +418,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -70,6 +70,7 @@ $strCarriage = 'Retour de chariot : \\r';
$strChange = 'Modifier';
$strChangeDisplay = 'Champ <20> afficher';
$strChangePassword = 'Modifier le mot de passe';
$strCharsetOfFile = 'Jeu de caract<63>res du fichier:';
$strCheckAll = 'Tout cocher';
$strCheckDbPriv = 'Afficher les privil<69>ges sur';
$strCheckTable = 'V<>rifier la table';

View File

@@ -71,6 +71,7 @@ $strCarriage = 'Retour de chariot : \\r';
$strChange = 'Modifier';
$strChangeDisplay = 'Champ à afficher';
$strChangePassword = 'Modifier le mot de passe';
$strCharsetOfFile = 'Jeu de caract<63>res du fichier:';
$strCheckAll = 'Tout cocher';
$strCheckDbPriv = 'Afficher les privilèges sur';
$strCheckTable = 'Vérifier la table';

View File

@@ -418,4 +418,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -396,4 +396,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -78,6 +78,7 @@ $strCarriage = 'Wagenr
$strChange = '<27>ndern';
$strChangeDisplay = 'Anzuzeigende Spalte bestimmen';
$strChangePassword = 'Kennwort <20>ndern';
$strCharsetOfFile = 'Zeichencodierung der Datei:';
$strCheckAll = 'Alle ausw<73>hlen';
$strCheckDbPriv = 'Rechte einer Datenbank pr<70>fen';
$strCheckTable = '<27>berpr<70>fe Tabelle';

View File

@@ -79,6 +79,7 @@ $strCarriage = 'Wagenrücklauf \\r';
$strChange = 'Ändern';
$strChangeDisplay = 'Anzuzeigende Spalte bestimmen';
$strChangePassword = 'Kennwort ändern';
$strCharsetOfFile = 'Zeichencodierung der Datei:';
$strCheckAll = 'Alle auswählen';
$strCheckDbPriv = 'Rechte einer Datenbank prüfen';
$strCheckTable = 'Überprüfe Tabelle';

View File

@@ -390,4 +390,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -391,4 +391,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -414,4 +414,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -416,4 +416,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -416,4 +416,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -420,4 +420,5 @@ $strYes = ' Si ';
$strZip = '"compresso con zip"';
// To translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -421,4 +421,5 @@ $strYes = ' Si ';
$strZip = '"compresso con zip"';
// To translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -423,4 +423,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -423,4 +423,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -424,4 +424,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -415,4 +415,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -418,4 +418,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -415,4 +415,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -414,4 +414,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -418,4 +418,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -414,4 +414,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -415,4 +415,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -418,4 +418,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -414,4 +414,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -418,4 +418,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -418,4 +418,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -421,4 +421,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -420,4 +420,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -420,4 +420,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -419,4 +419,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strYes = 'Da';
$strZip = '"zipano"';
// To translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strYes = 'Da';
$strZip = '"zipano"';
// To translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strYes = 'Da';
$strZip = '"zipano"';
// To translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -411,4 +411,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -412,4 +412,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -415,4 +415,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -416,4 +416,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -416,4 +416,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -416,4 +416,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -417,4 +417,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -416,4 +416,5 @@ $strNoValidateSQL = 'Skip Validate SQL'; //to translate
$strValidateSQL = 'Validate SQL'; //to translate
$strNoExplain = 'Skip Explain SQL'; //to translate
$strExplain = 'Explain SQL'; //to translate
$strCharsetOfFile = 'Character set of the file:'; //to translate
?>

View File

@@ -274,6 +274,10 @@ if ($sql_file != 'none') {
if (get_magic_quotes_runtime() == 1) {
$sql_query = stripslashes($sql_query);
}
// Convert the file's charset if necessary
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding && isset($charset_of_file) && $charset_of_file != $charset) {
$sql_query = iconv($charset_of_file, $charset, $sql_query);
}
}
}
else if (empty($id_bookmark) && get_magic_quotes_gpc() == 1) {

View File

@@ -95,6 +95,26 @@ if ($is_upload) {
?>
<div style="margin-bottom: 5px">
<input type="file" name="sql_file" class="textfield" /><br />
<?php
if ($cfg['AllowAnywhereRecoding'] && $allow_recoding) {
$temp_charset = reset($cfg['AvailableCharsets']);
echo $strCharsetOfFile . "\n"
. ' <select name="charset_of_file" size="1">' . "\n"
. ' <option value="' . $temp_charset . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
while ($temp_charset = next($cfg['AvailableCharsets'])) {
echo ' <option value="' . $temp_charset . '"';
if ($temp_charset == $charset) {
echo ' selected="selected"';
}
echo '>' . $temp_charset . '</option>' . "\n";
}
echo ' </select>';
}
?>
</div>
<?php
} // end if