Replaced ugly encode call with future import of unicode_literals