unable to enter accented characters
Posted by: Chris Hall
Date: January 05, 2006 02:00AM

I'm unable to enter accented characters in MySQL 5 and wondered if anyone could help me determine what the problem might be.

I'm running version 5.0.16-nt and it states my Server, Db, Client and Conn. characterssets are all utf8. This, under Windows XP.

When I try to enter strings containing accented characters, such as André, the characters are not added and I receive the message:
Error: 1406 Data too long for column
I re-installed MySQL in non-strict mode, and this also gives the same problem - albeit with a different error message:
Error: 1265 Data truncated for column

I'm simply try to insert it via the MySQL command line... so I'm not even try to connect to it with another application for the moment. Is there some basic setting or principle here that I've simply overlooked or not grasped?

I've tried creating a table and setting the character set explicitly
I've tried set names='utf8';
I've also tried re-installing, re-installing and not using strict mode, I've even tried installing MySQL4.1!
...but none of this seems to have any effect.

Here are my variables which might help:

mysql> show variables like 'c%';
| Variable_name | Value
| character_set_client | utf8
| character_set_connection | utf8
| character_set_database | utf8
| character_set_results | utf8
| character_set_server | utf8
| character_set_system | utf8
| character_sets_dir | C:\Program Files\MySQL\
MySQL Server 5.0\share\charsets\
| collation_connection | utf8_general_ci
| collation_database | utf8_general_ci
| collation_server | utf8_general_ci
| completion_type | 0
| concurrent_insert | 1
| connect_timeout | 5

And here's an example of the table I created:

mysql> create table pets (name varchar(20), owner varchar(20)) default character set utf8;
mysql> desc pets;
| Field | Type | Null | Key | Default | Extra |
| name | varchar(20) | YES | | NULL | |
| owner | varchar(20) | YES | | NULL | |

Options: ReplyQuote

Written By
unable to enter accented characters
January 05, 2006 02:00AM
January 20, 2006 05:11AM
January 22, 2006 11:40AM
February 08, 2006 11:13PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.