diff options
author | Mark Hatton <mark.hatton@shazam.com> | 2015-06-11 19:14:11 +0100 |
---|---|---|
committer | Mark Hatton <mark.hatton@shazam.com> | 2015-06-11 19:14:11 +0100 |
commit | 0c9b2feed5d5d253181a49beb1e806ba9df3bd1b (patch) | |
tree | 4f31eeb3c7b2a70c19259e034499a2ae9cf89a1a /src/test/scala | |
parent | 42757e9f27cc7b3253cdfcc330de209722e3eb63 (diff) | |
download | spray-json-0c9b2feed5d5d253181a49beb1e806ba9df3bd1b.tar.gz spray-json-0c9b2feed5d5d253181a49beb1e806ba9df3bd1b.tar.bz2 spray-json-0c9b2feed5d5d253181a49beb1e806ba9df3bd1b.zip |
= Fix decoding of 4-byte UTF-8 characters into UTF-16 surrogate pairs
Diffstat (limited to 'src/test/scala')
-rw-r--r-- | src/test/scala/spray/json/JsonParserSpec.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/scala/spray/json/JsonParserSpec.scala b/src/test/scala/spray/json/JsonParserSpec.scala index 2bef24c..0f7ae7f 100644 --- a/src/test/scala/spray/json/JsonParserSpec.scala +++ b/src/test/scala/spray/json/JsonParserSpec.scala @@ -64,7 +64,8 @@ class JsonParserSpec extends Specification { val json = JsObject( "7-bit" -> JsString("This is regular 7-bit ASCII text."), "2-bytes" -> JsString("2-byte UTF-8 chars like £, æ or Ö"), - "3-bytes" -> JsString("3-byte UTF-8 chars like ヨ, ᄅ or ᐁ.")) + "3-bytes" -> JsString("3-byte UTF-8 chars like ヨ, ᄅ or ᐁ."), + "4-bytes" -> JsString("4-byte UTF-8 chars like \uD801\uDC37, \uD852\uDF62 or \uD83D\uDE01.")) JsonParser(json.prettyPrint.getBytes("UTF-8")) === json } "parse directly from UTF-8 encoded bytes when string starts with a multi-byte character" in { |