Browse files

Added intelligence check for valid CHARSET value

Since mysql refers to CHARSETS in lower case and without dashes, the library will take care of converting and uppercase dashed values to lowercase no-dash values. For example, "UTF-8" will be valid, because it will be automatically transformed to "utf8".
  • Loading branch information...
1 parent 07acf4f commit 95aa4cf85c6e84e103a2e4a306290e73ff565373 @Lwangaman Lwangaman committed Jan 26, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 mysql/ez_sql_mysql.php
1 mysql/ez_sql_mysql.php
@@ -136,6 +136,7 @@ function select($dbname='', $encoding='')
$this->dbname = $dbname;
+ $encoding = strtolower(str_replace("-","",$encoding));
$charsets = array();
$result = mysql_query("SHOW CHARACTER SET");
while($row = mysql_fetch_array($result,MYSQL_ASSOC))

0 comments on commit 95aa4cf

Please sign in to comment.