Allow non ASCII characters in queries

The plugin currently raises an error if characters like "ñ" are used in the query.
Converting QString objects to unicode instead of str seems to solve this issue.