Fix text encode