diff options
author | Piotr Przybylski <piotrprz@gmail.com> | 2011-06-10 23:09:50 +0400 |
---|---|---|
committer | Piotr Przybylski <piotrprz@gmail.com> | 2011-06-10 23:09:50 +0400 |
commit | e8b144da1188af7cc1212dbaa97cf6723eb44b0a (patch) | |
tree | 4fd62b8cda9fbcea44d38404d73f94ffe2ffcc2c /import.php | |
parent | b35cd1b40fa6432600299a0c69f5620609db4791 (diff) |
File import - Drizzle has no SET NAMES so charset conversion without any PHP conversion library is impossible - throw an error
Diffstat (limited to 'import.php')
-rw-r--r-- | import.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/import.php b/import.php index cd56bc2c37..6ae7c91233 100644 --- a/import.php +++ b/import.php @@ -347,10 +347,16 @@ if ($GLOBALS['PMA_recoding_engine'] != PMA_CHARSET_NONE && isset($charset_of_fil $charset_conversion = true; } } elseif (isset($charset_of_file) && $charset_of_file != 'utf8') { - PMA_DBI_query('SET NAMES \'' . $charset_of_file . '\''); - // We can not show query in this case, it is in different charset - $sql_query_disabled = true; - $reset_charset = true; + if (PMA_DRIZZLE) { + // Drizzle doesn't support other character sets, so we can't fallback to SET NAMES - throw an error + $error = true; + $message = PMA_Message::error(__('Cannot convert file\'s character set without character set conversion library')); + } else { + PMA_DBI_query('SET NAMES \'' . $charset_of_file . '\''); + // We can not show query in this case, it is in different charset + $sql_query_disabled = true; + $reset_charset = true; + } } // Something to skip? |