(encode_coding): Fix the bug of not flushing ISO escape sequence at