fn escape_char(writer: &mut dyn Write, v: char) -> EncodeResult