Menu

#3049 Export with file option creates invalid commands

3.5.5
open
nobody
Normal
2015-02-15
2010-06-22
No

When using the export option with the Save as file, option enabled creates some commands that when doing the import of the very same generated file does not import the spanish characters correctly.
This in an example of an export file with the Save as file option enabled:
-- phpMyAdmin SQL Dump
-- version 3.3.4-rc1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 22, 2010 at 04:45 AM
-- Server version: 5.1.46
-- PHP Version: 5.3.2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES latin1 */;
--
-- Database: `carlos_photoalbums`
--
-- --------------------------------------------------------
--
-- Table structure for table `PhotoAlbums`
--

then the table and the data details and at the end:
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

This is the very same export but WITHOUT the Save as file option enabled
-- phpMyAdmin SQL Dump
-- version 3.3.4-rc1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 22, 2010 at 04:44 AM
-- Server version: 5.1.46
-- PHP Version: 5.3.2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `carlos_photoalbums`
--
-- --------------------------------------------------------
--
-- Table structure for table `PhotoAlbums`
--
then the table and the data details and at the end there is nothing else.
---------------------------------------------------------------------------------------------------------------------------------------------------------
This behavior is the same using PMA, 332, 333, and the recently released 334.rc1

I use Apache 2.2.11, Php 5.3.2 and MySQL client version: mysqlnd 5.0.7-dev - 091210 - $Revision: 294543 $

If I delete those 6 lines (3 at beginning and the 3 at end) the impor works correctly and the spanish characters are saved fine.

Discussion

<< < 1 2 (Page 2 of 2)
  • Marc Delisle

    Marc Delisle - 2010-07-07

    We have to find out the best way to solve this problem. In fact, the file containing the line /*!40101 SET NAMES latin1 */; works fine when imported with the mysql command-line client and we have to continue supporting this.

    If there are two possible sources, well users must be able to choose the character set and not be forced with the iso-8859-1 choice like you are doing.

    Obviously, three of four years ago this solution worked for the then-current phpMyAdmin version but it's no longer the case. This solution was not suggested for all future versions!

    And yes, you'll notice that this artifact is still open as a bug.

     
  • Marc Delisle

    Marc Delisle - 2013-01-22
    • milestone: 3.3.4 --> 3.5.5
     
  • Isaac Bennetch

    Isaac Bennetch - 2014-06-19

    Is this still relevant to phpMyAdmin 4.x? It seems to me that with the changes to the code base (removing $cfg['DefaultCharset'] and $cfg['AvailableCharsets'], for instance) this is out of date.

     

    Last edit: Isaac Bennetch 2014-07-09
  • Marc Delisle

    Marc Delisle - 2015-02-15
    • Priority: 5 --> Normal
     
<< < 1 2 (Page 2 of 2)