Bug #22817 Importing data doens't work correctly with accents and UTF-8
Submitted: 29 Sep 2006 9:27 Modified: 22 Nov 2006 11:40
Reporter: [ name withheld ] Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Query Browser Severity:S3 (Non-critical)
Version:1.2.3 beta OS:Mac OS X (MAC OS X 10.4.7)
Assigned to: CPU Architecture:Any
Tags: Accent, import, Latin1, UTF-8

[29 Sep 2006 9:27] [ name withheld ]
Description:
Hi

When I try to use MySQL Query Browser to import datas with import statment, who the data has french or german accents, it will not work correctly.
If my DB is UTF-8, my table is UTF-8, the sql import close will import in Latin1 format instead of UTF-8 !

Marc

How to repeat:
Try to import with Query Browser Strings with accent in the DB who your table is MyISAM with charachter set UTF-8 and collation UTF8_general_ci. 

Suggested fix:
use the command line on unix and import with the following statment.
The datas will be imported in the correct format (UTF-8), but the select to 
check it will get the result in Latin1 !

mysql> SET CHARACTER SET utf8;
Query OK, 0 rows affected (0.00 sec)

mysql> load data infile '/etc/BC_MAS_CTY' into table BC_MAS_CTY;
Query OK, 5321 rows affected, 51 warnings (0.18 sec)
Records: 5321  Deleted: 0  Skipped: 0  Warnings: 51

mysql> select * from bc_mas_cty;
+------+---------+------+-------+--------------------------+-------------------------------------+--------+------+
| onrp | zipType | zip  | zipCc | city                     | cityFull                            | canton | id   |
+------+---------+------+-------+--------------------------+-------------------------------------+--------+------+
| 1000 | 10      | 1753 | 0     | Matran                   | Matran                              | FR     | 1    |
| 1003 | 20      | 1754 | 0     | Rosé                    | Rosé                               | FR     | 2    |
...
...
| 999  | 30      | 1752 | 2     | Villars-Glâne 2         | Villars-sur-Glâne 2                | FR     | 5321 |
+------+---------+------+-------+--------------------------+-------------------------------------+--------+------+
5321 rows in set (0.07 sec)

mysql>
[22 Oct 2006 11:40] Valeriy Kravchuk
Thank you for a problem report. Please, try to repeat with a newer version, 1.2.4 rc, and inform about the results.
[23 Nov 2006 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".