diff options
-rw-r--r-- | src/ser.rs | 2 | ||||
-rw-r--r-- | tests/valid/unicode-escape.json | 1 | ||||
-rw-r--r-- | tests/valid/unicode-escape.toml | 1 |
3 files changed, 3 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)), } diff --git a/tests/valid/unicode-escape.json b/tests/valid/unicode-escape.json index 8c09dc0..32948c6 100644 --- a/tests/valid/unicode-escape.json +++ b/tests/valid/unicode-escape.json @@ -1,4 +1,5 @@ { + "answer1": {"type": "string", "value": "\u000B"}, "answer4": {"type": "string", "value": "\u03B4α"}, "answer8": {"type": "string", "value": "\u03B4β"} } diff --git a/tests/valid/unicode-escape.toml b/tests/valid/unicode-escape.toml index 20198f4..c0d5a25 100644 --- a/tests/valid/unicode-escape.toml +++ b/tests/valid/unicode-escape.toml @@ -1,2 +1,3 @@ +answer1 = "\u000B" answer4 = "\u03B4α" answer8 = "\U000003B4β" |