-
Notifications
You must be signed in to change notification settings - Fork 67
Open
@lenianiva
Description
When I put the unicode character "∀" into cat, the output doesn't roundtrip:
Input:
∀
226 136 128
Output:
��
195 162 194 136 194 128
Code:
use rexpect::spawn; use rexpect::error::*; fn display(s: &str) { println!("{}", s); for b in s.as_bytes() { print!("{} ", b); } println!(""); } fn repl() -> Result<(), Error> { let mut p = spawn("cat", Some(1000))?; let ex: String = "∀".to_string(); p.send_line(&ex)?; let line = p.read_line()?; println!("Input:"); display(&ex); println!("Output:"); display(&line); Ok(()) } fn main() { repl().unwrap_or_else(|e| panic!("ftp job failed with {}", e)); }
Metadata
Metadata
Assignees
Labels
No labels