What am I missing when dealing with foreign chars?
Posted by: Sql Er
Date: November 04, 2010 03:57PM

Hi,

I ran into the following problem when I select from a table:

SELECT name FROM X WHERE name = 'Vina Concha y Toro';

I get 2 results back:

1. Vina Concha y Toro
2. Viña Concha y Toro

The 2nd result seems to have a non-english character (i.e. ñ), but mysql does not seem to distinguish between the two results.

I checked the 'name' column of table X and the collation is 'latin1_swedish_ci'. I initially assumed that this was the problem. I then created table Y with collation 'utf8_general_ci' for 'name' column and inserted both results there [not sure if this was a correct choice, but assumed that utf8 should be a catch all case?]. When I repeated the query, I got the exact same results back. So, this does not seem to have solved the problem.

Can someone please suggest what I can do to only get 'Vina Concha y Toro' when I do:

SELECT name FROM X WHERE name = 'Vina Concha y Toro';

and only get 'Viña Concha y Toro' when I do:

SELECT name FROM X WHERE name = 'Viña Concha y Toro';


Thanks a lot!

Options: ReplyQuote


Subject
Views
Written By
Posted
What am I missing when dealing with foreign chars?
2710
November 04, 2010 03:57PM


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.