Added Unicode error handling