mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 14:17:26 +02:00
Verify UTF-8 encoding of CSV import
This commit is contained in:
@@ -240,6 +240,7 @@ $translations = array(
|
|||||||
|
|
||||||
'Import' => 'Import',
|
'Import' => 'Import',
|
||||||
'%d row(s) have been imported.' => array('Byl importován %d záznam.', 'Byly importovány %d záznamy.', 'Bylo importováno %d záznamů.'),
|
'%d row(s) have been imported.' => array('Byl importován %d záznam.', 'Byly importovány %d záznamy.', 'Bylo importováno %d záznamů.'),
|
||||||
|
'File must be in UTF-8 encoding.' => 'Soubor musí být v kódování UTF-8.',
|
||||||
|
|
||||||
// in-place editing in select
|
// in-place editing in select
|
||||||
'Ctrl+click on a value to modify it.' => 'Ctrl+klikněte na políčko, které chcete změnit.',
|
'Ctrl+click on a value to modify it.' => 'Ctrl+klikněte na políčko, které chcete změnit.',
|
||||||
|
@@ -240,6 +240,7 @@ $translations = array(
|
|||||||
|
|
||||||
'Import' => 'xx',
|
'Import' => 'xx',
|
||||||
'%d row(s) have been imported.' => array('xx', 'xx'),
|
'%d row(s) have been imported.' => array('xx', 'xx'),
|
||||||
|
'File must be in UTF-8 encoding.' => 'xx',
|
||||||
|
|
||||||
// in-place editing in select
|
// in-place editing in select
|
||||||
'Ctrl+click on a value to modify it.' => 'xx',
|
'Ctrl+click on a value to modify it.' => 'xx',
|
||||||
|
@@ -158,8 +158,11 @@ if ($_POST && !$error) {
|
|||||||
queries_redirect(remove_from_uri(), lang('%d item(s) have been affected.', $affected), $result);
|
queries_redirect(remove_from_uri(), lang('%d item(s) have been affected.', $affected), $result);
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif (is_string($file = get_file("csv_file", true))) {
|
} elseif (!is_string($file = get_file("csv_file", true))) {
|
||||||
//! character set
|
$error = upload_error($file);
|
||||||
|
} elseif (!preg_match('~~u', $file)) {
|
||||||
|
$error = lang('File must be in UTF-8 encoding.');
|
||||||
|
} else {
|
||||||
cookie("adminer_import", "output=" . urlencode($adminer_import["output"]) . "&format=" . urlencode($_POST["separator"]));
|
cookie("adminer_import", "output=" . urlencode($adminer_import["output"]) . "&format=" . urlencode($_POST["separator"]));
|
||||||
$result = true;
|
$result = true;
|
||||||
$cols = array_keys($fields);
|
$cols = array_keys($fields);
|
||||||
@@ -190,8 +193,6 @@ if ($_POST && !$error) {
|
|||||||
queries_redirect(remove_from_uri("page"), lang('%d row(s) have been imported.', $affected), $result);
|
queries_redirect(remove_from_uri("page"), lang('%d row(s) have been imported.', $affected), $result);
|
||||||
queries("ROLLBACK"); // after queries_redirect() to not overwrite error
|
queries("ROLLBACK"); // after queries_redirect() to not overwrite error
|
||||||
|
|
||||||
} else {
|
|
||||||
$error = upload_error($file);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,6 +4,7 @@ Use shadow for highlighting default button
|
|||||||
Don't use LIMIT 1 if inline updating unique row
|
Don't use LIMIT 1 if inline updating unique row
|
||||||
Don't check previous checkbox on added column in create table (bug #3614245)
|
Don't check previous checkbox on added column in create table (bug #3614245)
|
||||||
Order table list by name
|
Order table list by name
|
||||||
|
Verify UTF-8 encoding of CSV import
|
||||||
PostgreSQL: Fix detecting oid column in PDO
|
PostgreSQL: Fix detecting oid column in PDO
|
||||||
PostgreSQL: Handle timestamp types (bug #3614086)
|
PostgreSQL: Handle timestamp types (bug #3614086)
|
||||||
Add Korean translation
|
Add Korean translation
|
||||||
|
2
todo.txt
2
todo.txt
@@ -21,7 +21,7 @@ Rank, Tree structure
|
|||||||
|
|
||||||
MySQL:
|
MySQL:
|
||||||
Data longer than max_allowed_packet can be sent by mysqli_stmt_send_long_data()
|
Data longer than max_allowed_packet can be sent by mysqli_stmt_send_long_data()
|
||||||
? Geometry support
|
COLLATE utf8_bin comparison doesn't use index with other than UTF-8 columns
|
||||||
|
|
||||||
SQLite:
|
SQLite:
|
||||||
Copy tables
|
Copy tables
|
||||||
|
Reference in New Issue
Block a user