on master help sign in
Expand charUtf8
commit5ab0d5f279789514bea18303cbf0c6c2fc11108d authorBryan O'Sullivan <bos@serpentine.com> dateMon 6 Jul 2015, 20:03 (11 years ago) parentb2ceb12
1 file changed+1−1
Data/Aeson/Encode/Builder.hs+1−1
Data/Aeson/Encode/Builder.hs+1−1
@@ -94,7 +94,7 @@ unquoted t = TE.encodeUtf8BuilderEscaped escapeAscii t
9494-- | Encode a JSON string.
9595string :: String -> Builder
9696string t = B.char8 '"' <> foldMap go t <> B.char8 '"'
97− where go c | c > '\x7f' = B.charUtf8 c
97+ where go c | c > '\x7f' = BP.primBounded BP.charUtf8 c
9898 | otherwise = BP.primBounded escapeAscii (c2w c)
9999{-# INLINE string #-}
100100