projects
/
horde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69c1320
)
Convert all latin charsets.
author
Jan Schneider
<jan@horde.org>
Thu, 11 Nov 2010 14:19:01 +0000
(15:19 +0100)
committer
Jan Schneider
<jan@horde.org>
Thu, 11 Nov 2010 14:19:01 +0000
(15:19 +0100)
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
patch
|
blob
|
history
diff --git
a/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
b/framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
index
0b18c31
..
005ce34
100644
(file)
--- a/
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
+++ b/
framework/Db/lib/Horde/Db/Adapter/Mysql/Schema.php
@@
-159,10
+159,7
@@
class Horde_Db_Adapter_Mysql_Schema extends Horde_Db_Adapter_Base_Schema
*/
public function _mysqlCharsetName($charset)
{
- $charset = strtolower(preg_replace('/[^a-zA-Z0-9]/', '', $charset));
- if ($charset == 'iso88591') {
- $charset = 'latin1';
- }
+ $charset = strtolower(preg_replace(array('/[^a-zA-Z0-9]/', '/iso8859(\d)/'), array('', 'latin$1'), $charset));
$validCharsets = $this->selectValues('SHOW CHARACTER SET');
if (!in_array($charset, $validCharsets)) {
throw new Horde_Db_Exception($charset . ' is not supported by MySQL');