diff options
author | Alan Du <alanhdu@gmail.com> | 2017-05-30 23:49:26 +0100 |
---|---|---|
committer | Alan Du <alanhdu@gmail.com> | 2017-05-30 23:55:09 +0100 |
commit | f98d6ccd70850708ca9d7fc98c561556148b397d (patch) | |
tree | 4710364895c56e9fa52a88fa3f20880b7891e664 /src | |
parent | a40a2cb389b97844e3ebd615f53273be0c004edd (diff) | |
download | milf-rs-f98d6ccd70850708ca9d7fc98c561556148b397d.tar.gz milf-rs-f98d6ccd70850708ca9d7fc98c561556148b397d.zip |
Encode control characters with hex not decimal
Fix https://github.com/alexcrichton/toml-rs/issues/178
Diffstat (limited to 'src')
-rw-r--r-- | src/ser.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -290,7 +290,7 @@ impl<'a> Serializer<'a> { '\u{22}' => drop(write!(self.dst, "\\\"")), '\u{5c}' => drop(write!(self.dst, "\\\\")), c if c < '\u{1f}' => { - drop(write!(self.dst, "\\u{:04}", ch as u32)) + drop(write!(self.dst, "\\u{:04X}", ch as u32)) } ch => drop(write!(self.dst, "{}", ch)), } |