streaming-commons 0.2.2.4 → 0.2.2.5
raw patch · 3 files changed
+12/−2 lines, 3 files
Files
- ChangeLog.md +4/−0
- Data/Streaming/Text.hs +5/−1
- streaming-commons.cabal +3/−1
ChangeLog.md view
@@ -1,5 +1,9 @@ # ChangeLog for streaming-commons +## 0.2.2.5++* UTF-8 Decoder fails on trailing bytes [#71](https://github.com/fpco/streaming-commons/pull/71)+ ## 0.2.2.4 * Fix docstrings for text 2.0
Data/Streaming/Text.hs view
@@ -126,7 +126,11 @@ -- Caught exception does not allow to reconstruct 'DecodeResultFailure', -- so delegating this to 'decodeUtf8Pure' Left (_ :: TE.UnicodeException) -> decodeUtf8Pure (prev <> curr)- Right (TE.Some decoded undecoded cont) -> DecodeResultSuccess decoded (go undecoded cont)+ Right (TE.Some decoded undecoded cont)+ -- An empty bytestring indicates end-of-input, if we still have undecoded bytes that+ -- becomes a failure.+ | B.null curr && not (B.null undecoded) -> DecodeResultFailure decoded undecoded+ | otherwise -> DecodeResultSuccess decoded (go undecoded cont) #else decodeUtf8 = decodeChunk B.empty 0 0 where
streaming-commons.cabal view
@@ -1,5 +1,5 @@ name: streaming-commons-version: 0.2.2.4+version: 0.2.2.5 synopsis: Common lower-level functions needed by various streaming data libraries description: Provides low-dependency functionality commonly needed by various streaming data libraries, such as conduit and pipes. homepage: https://github.com/fpco/streaming-commons@@ -94,6 +94,8 @@ , network >= 2.4.0.0 , text , zlib+ build-tool-depends:+ hspec-discover:hspec-discover if flag(use-bytestring-builder) build-depends: bytestring < 0.10.2.0