Skip to content

Data.Text.Encoding.Base16.decodeBase16Lenient fails in base16-1.0 with Invalid UTF-8 stream #32

Description

@jonathangenlambda

Data.Text.Encoding.Base16.decodeBase16Lenient fails in base16-1.0 with Invalid UTF-8 stream:

"\NUL\DC4ß\DLEGENS" `shouldBe` Data.Text.Encoding.Base16.decodeBase16Lenient "0014df1047454e53"

fails with

uncaught exception: UnicodeException
       Cannot decode byte '\xdf': Data.Text.Encoding: Invalid UTF-8 stream

This is a regression as with base16-0.3.2.1 this didn't fail and produced the string "\NUL\DC4ß\DLEGENS"

Also the haddock clearly states that decodeBase16Lenient never fails: using a strategy that never fails, catching unicode exceptions raised in the process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions