aboutsummaryrefslogtreecommitdiff
path: root/src/display.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/display.rs')
-rw-r--r--src/display.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/display.rs b/src/display.rs
index f563b77..0a41e2a 100644
--- a/src/display.rs
+++ b/src/display.rs
@@ -49,6 +49,9 @@ fn write_str(f: &mut fmt::Formatter, s: &str) -> fmt::Result {
'\u{d}' => try!(write!(f, "\\r")),
'\u{22}' => try!(write!(f, "\\\"")),
'\u{5c}' => try!(write!(f, "\\\\")),
+ c if c < '\u{1f}' => {
+ try!(write!(f, "\\u{:04}", ch as u32))
+ }
ch => try!(write!(f, "{}", ch)),
}
}