From 428ed49d17533adb5444d85e8b194883fea99bb5 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 31 Mar 2010 14:23:50 +0200 Subject: [PATCH 1/2] patch #2979234 [import] Create tables with current charset and collation. --- ChangeLog | 1 + libraries/import.lib.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index cf576c2b6..1b2f475d5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,6 +18,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA thanks to Kaarel Nummert - kaarelnu - patch #2978815 [pdf] Fix generating PDF with table dimensions, thanks to BlinK_ - patch #2977725 [export] XML wrongly encoded, thanks to Victor Volkov - hanut +- patch #2979234 [import] Create tables with current charset and collation. 3.3.1.0 (2010-03-16) - bug #2941037 [core] Database structure not sorted by table correctly diff --git a/libraries/import.lib.php b/libraries/import.lib.php index ca2ac2c55..2f50c5dc3 100644 --- a/libraries/import.lib.php +++ b/libraries/import.lib.php @@ -947,7 +947,7 @@ function PMA_buildSQL($db_name, &$tables, &$analyses = NULL, &$additional_sql = $tempSQLStr .= ", "; } } - $tempSQLStr .= ") ENGINE=MyISAM;"; + $tempSQLStr .= ") ENGINE=MyISAM DEFAULT CHARACTER SET " . $charset . " COLLATE " . $collation . ";"; /** * Each SQL statement is executed immediately From 1e984375b6ab0253b8c1860b55a11e705be772c0 Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 31 Mar 2010 14:25:08 +0200 Subject: [PATCH 2/2] patch #2979234, bug #2960105 [import] Properly import unicode text from ODS. --- ChangeLog | 1 + libraries/import/ods.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1b2f475d5..0b902cebd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - patch #2978815 [pdf] Fix generating PDF with table dimensions, thanks to BlinK_ - patch #2977725 [export] XML wrongly encoded, thanks to Victor Volkov - hanut - patch #2979234 [import] Create tables with current charset and collation. +- patch #2979234, bug #2960105 [import] Properly import unicode text from ODS. 3.3.1.0 (2010-03-16) - bug #2941037 [core] Database structure not sorted by table correctly diff --git a/libraries/import/ods.php b/libraries/import/ods.php index 89701ec19..81aed5e20 100644 --- a/libraries/import/ods.php +++ b/libraries/import/ods.php @@ -68,7 +68,7 @@ unset($data); * result in increased performance without the need to * alter the code in any way. It's basically a freebee. */ -$xml = simplexml_load_string(utf8_encode($buffer), "SimpleXMLElement", LIBXML_COMPACT); +$xml = simplexml_load_string($buffer, "SimpleXMLElement", LIBXML_COMPACT); unset($buffer);