I assume that your script performs ajax calls in order to receive the text for the autofill.
Assuming that you have UTF-8 values stored in your database the modifications needed seem very straightforward.
I have implemented a lot of solutions for javascript, php and ajax so far, so this is going to be easy for me.
I am going to make some additions to the html code and I am going to modify the php back-end code in order to make your script work for UTF-8. There is a possibility that some modifications need to be done in the database structure as well...
Thank you for your time and consideration.