convert iso8859-1 to latin1 for mysql
authorChuck Hagenbuch <chuck@horde.org>
Wed, 24 Dec 2008 21:28:31 +0000 (16:28 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Wed, 24 Dec 2008 21:28:31 +0000 (16:28 -0500)
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php

index 3f370b4..11a70cd 100644 (file)
@@ -163,6 +163,9 @@ class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Abstract_Schema
     public function _mysqlCharsetName($charset)
     {
         $charset = strtolower(preg_replace('/[^a-zA-Z0-9]/', '', $charset));
+        if ($charset == 'iso88591') {
+            $charset = 'latin1';
+        }
         $validCharsets = $this->selectValues('SHOW CHARACTER SET');
         if (!in_array($charset, $validCharsets)) {
             throw new Horde_Db_Exception($charset . ' is not supported by MySQL');