Bug #26577 Problem with letters with accent (áéíóú)
Submitted: 22 Feb 2007 19:31 Modified: 23 Feb 2007 1:38
Reporter: William Chiquito Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:5.0.33-community-max OS:Windows (Windows XP SP2)
Assigned to: CPU Architecture:Any
Tags: letters with accent

[22 Feb 2007 19:31] William Chiquito
Description:
Problem with letters with accent (áéíóú) when I execute command \. or SOURCE

How to repeat:
Create the file test.sql

test.sql:

DROP TABLE IF EXISTS `t1`;

CREATE TABLE `t1` (
`id` int(11) NOT NULL auto_increment,
`nombre` varchar(50) collate latin1_spanish_ci default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;

LOCK TABLES `t1` WRITE;

insert into `t1`(`id`,`nombre`) values (1,'áéíóú');

UNLOCK TABLES;

select * from t1;

soon:

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.0.33-community-max Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mydatabase
Database changed

mysql> \. z:\test.sql
Query OK, 0 rows affected, 1 warning (0.00 sec)

Query OK, 0 rows affected (0.06 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 1 row affected (0.02 sec)

Query OK, 0 rows affected (0.00 sec)

+----+--------+
| id | nombre |
+----+--------+
|  1 | ßÚݾ·  |
+----+--------+
1 row in set (0.00 sec)

mysql> source c:\test.sql
Query OK, 0 rows affected (0.03 sec)

Query OK, 0 rows affected (0.05 sec)

Query OK, 0 rows affected (0.00 sec)

Query OK, 1 row affected (0.02 sec)

Query OK, 0 rows affected (0.00 sec)

+----+--------+
| id | nombre |
+----+--------+
|  1 | ßÚݾ·  |
+----+--------+
1 row in set (0.00 sec)

If I execute script directly there is no problem:

mysql> DROP TABLE IF EXISTS `t1`;
Query OK, 0 rows affected (0.03 sec)

mysql> CREATE TABLE `t1` (
    -> `id` int(11) NOT NULL auto_increment,
    -> `nombre` varchar(50) collate latin1_spanish_ci default NULL,
    -> PRIMARY KEY (`id`)
    -> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_spanish_ci;
Query OK, 0 rows affected (0.06 sec)

mysql> LOCK TABLES `t1` WRITE;
Query OK, 0 rows affected (0.00 sec)

mysql> insert into `t1`(`id`,`nombre`) values (1,'áéíóú');
Query OK, 1 row affected (0.02 sec)

mysql> UNLOCK TABLES;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from t1;
+----+--------+
| id | nombre |
+----+--------+
|  1 | áéíóú  |
+----+--------+
1 row in set (0.00 sec)
[22 Feb 2007 22:42] MySQL Verification Team
Using a file script

Attachment: accent.PNG (image/png, text), 53.86 KiB.

[22 Feb 2007 22:45] MySQL Verification Team
Thank you for the bug report. I was not able to repeat the behavior
reported. Created a file script using notepad pasting the test case
provided. Attached a picture with the result.
[23 Feb 2007 1:35] William Chiquito
accent1

Attachment: accent1.PNG (image/png, text), 14.74 KiB.

[23 Feb 2007 1:38] William Chiquito
Will be a problem of the Windows command window?
[2 Dec 2008 15:14] German Pizarro
That is a Windows display problem.

if you run a batch file (eg: test.bat) with 
@echo áéíóú
@pause

you will see the same funny characters

I'm still trying to figure it out.

regards