# How to make mysql distinguish between english and non-english characters?

**URL:** <https://forums.percona.com/t/how-to-make-mysql-distinguish-between-english-and-non-english-characters/1552>\
**Category:** Other MySQL® Questions\
**Created:** [November 4, 2010, 4:07pm UTC](https://forums.percona.com/t/how-to-make-mysql-distinguish-between-english-and-non-english-characters/1552 "2010-11-04T16:07:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sql\_er](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@sql\_er](https://forums.percona.com/u/sql_er)\
**Post date:** [November 4, 2010, 4:07pm UTC](https://forums.percona.com/t/how-to-make-mysql-distinguish-between-english-and-non-english-characters/1552/1 "2010-11-04T16:07:15Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![gmouse](https://avatars.discourse-cdn.com/v4/letter/g/b9e5f3/32.png) [@gmouse](https://forums.percona.com/u/gmouse)\
**Post date:** [November 5, 2010, 7:38am UTC](https://forums.percona.com/t/how-to-make-mysql-distinguish-between-english-and-non-english-characters/1552/2 "2010-11-05T07:38:30Z")

</div>

[http://dev.mysql.com/doc/refman/5.1/en/string-comparison-fun](http://dev.mysql.com/doc/refman/5.1/en/string-comparison-fun) ctions.html

[http://dev.mysql.com/doc/refman/5.1/en/charset-collations.ht](http://dev.mysql.com/doc/refman/5.1/en/charset-collations.ht) ml

There you go. You probably want a binary comparison.
