Fix UTF-8 support for strings coming from the search field

Signed-off-by: Jerome Flesch <jflesch@gmail.com>