Fixed unicode issues with sqlite3 database queries