0

I was trying to use the jQuery autocomplete widget with one of my project.

You can see the complete code here :

http://www.jqueryautocomplete.com/jquery-autocomplete-php-mysql-json-example.html.

The code works fine as explained.

Once I change the database encoding to UTF8, the scripts starts behaving differently altogether. If I type a capital A it shows only names which were saved using a capital A, like Allan, Amy, Annie but when I type in small 'a' all name having capital initials disappears. I tried searching for answers everywhere but couldn't find any. Can anyone of you please help.

Varun Nath
  • 5,570
  • 3
  • 23
  • 39
  • 1
    http://stackoverflow.com/questions/279170/utf-8-all-the-way-through – Marc B Jul 30 '14 at 16:57
  • 1
    so the problem is it returns capital letters when writing capital letters and not when they're not? we have different visions of problems... but anyway, be sure to choose the case insensitive option for the utf8 collation you choose if you wish for it to be case insensitive – Félix Adriyel Gagnon-Grenier Jul 30 '14 at 17:03
  • @Félix Gagnon-Grenier, yes, if you saw the link there are two names Aragorn and Arwen in the sample database which works good with both capital 'A' and a small 'a'. Once the database encoding in changed to utf8 and then you type in small 'a' both Aragon and Arwen wont show up. –  Jul 30 '14 at 17:11

1 Answers1

0

You probably did change the encoding from a case insensitive to a case sensitiv one.

The different behavior is not due to the script, its due to your database. Pick a case insensitiv encoding like utf8_unicode_ci and you will be fine.

SBH
  • 1,787
  • 3
  • 22
  • 27
  • yes, its working now, thank you SBH and Felix, you guys have been a great help. –  Jul 30 '14 at 17:20