modifying the control codes to avoid non-ascii characters being used