-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Hi, UTF-16 surrogate pairs are incorrectly decoded:
λ> Json.decode $ Bytes.fromByteString "\"\\ud800\\udc00\""
Right (String "\65533\65533")
-- should be
λ> Aeson.decode "\"\\ud800\\udc00\"" :: Maybe Aeson.Value
Just (String "\65536")And invalid sequences are emitted in some cases:
λ> J.decode $ Bytes.fromByteString "\"\\ud800\\udfff\""
Right (String "*** Exception: recoverDecode: invalid argument (invalid byte sequence)
-- should be
λ> Aeson.decode "\"\\ud800\\udfff\"" :: Maybe Aeson.Value
Just (String "\66559")Metadata
Metadata
Assignees
Labels
No labels