Fix encoding error while printing