term.c (encode_terminal_code): Encode byte chars to the correspnding bytes.