1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 16:44:17 +02:00

Decode Windows error message

This commit is contained in:
Jakub Vrana
2011-08-09 11:51:18 +02:00
parent 734f0881f0
commit c75ee44387

View File

@@ -253,7 +253,11 @@ if (!defined("DRIVER")) {
$connection->query("SET sql_quote_show_create = 1");
return $connection;
}
return $connection->error;
$return = $connection->error;
if (function_exists('iconv') && !is_utf8($return) && strlen($s = iconv("windows-1250", "utf-8", $return)) > strlen($return)) { // windows-1250 - most common Windows encoding
$return = $s;
}
return $return;
}
/** Get cached list of databases