You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Formatting a string containing special characters with Debug usually prints them escaped i.e."\r\n\t".
fn main() {
use std::ffi::OsStr;
let str = "Hello\r\n\tThere";
let os_str: &OsStr = str.as_ref();
println!("{:?}", str);
println!("{:?}", os_str);
}
This snippet runs as expected in the playground. However on Windows, using both rustc 1.3.0-nightly (be23d44a5 2015-07-20) and rustc 1.1.0 (35ceea399 2015-06-19), the OsStr is printed unescaped :
"Hello\r\n\tThere"
"Hello
there"
From what I can gather, impl fmt::Debug for Wtf8 only concerns itself with faulty surrogates and completely ignores special characters.