accented letters, display and search
Posted by: Alessandro Abiusi
Date: January 31, 2013 04:31AM

as the title, I have trouble with these blessed accented letters.
I know that the 'subject was covered billions of times, but just can not seem to solve.
Mysql version 5.5.29 64bit.
I have the following problem:
I create a database starting with character encoding to utf8 with the command

"Crate the official database;"

I create a table (up to some versions ago), the column names I could put an accent not anymore (first issue), but this matters little, then run

"Create table customer (id int not null auto_increment, City varchar (255) not null, primary key (id));"

I'm going to create my table insert (from ms-dos prompt), created in the column, the character "ò" through

"Insert into customers (City) VALUES ('o');"

and here comes the first problem, the terminal answers me

"Mysql> insert into customers (City) values ​​(" ò ");
ERROR 1366 (HY000): Incorrect string value: '\ x95' for column 'City' at row 1
mysql> "

then I force the connection to the database with the command

"Set names latin1"

Rieseguo the 'insert, is magically takes me an accented letter.
Now, to business needs, the database will be 'backupped' (pass the word) 1 time per day.
Then running back, I like to check the correct data import, what 'now there is a need, then I get disconnected mysql, and run the command

"Mysqldump-u user-p official> backup.sql"

OnRPG create a database to test the 'import

"I try create database;"

at this point the backup through reimporto

"Mysqldump-u user-p I try <backup.sql"

Result I find a table with columns 'id and Citta' but completely empty.

I tried one of the many attempts, forcing the 'exports in latin1, in that case I inserted the data into the database, but when executing an

"Select * from clients where City LIKE '%ò%';"

Comes back to me empty, but if I try '%o%', I found the field. But ò stressed, had a strange character, but by the carattare phpmyadmin I saw him right!
Does anyone know how to solve this problem permanently boring?

Thanks for any replies


Options: ReplyQuote

Written By
accented letters, display and search
January 31, 2013 04:31AM
February 01, 2013 01:12AM

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.