This PR fixes broken UTF-8 decoding in ghc-events.
The first commit demonstrates the issue. As you can see in https://travis-ci.org/maoe/ghc-events/jobs/628026035#L665-L666, current ghc-events cannot decode unicode characters properly. This is because getString internally uses nBytes, which reads bytes as [Word8] and turns it into String using chr. In this PR getString is replaced with getTextNul and it uses text's decodeUtf8' instead.
This PR fixes broken UTF-8 decoding in ghc-events.
The first commit demonstrates the issue. As you can see in https://travis-ci.org/maoe/ghc-events/jobs/628026035#L665-L666, current ghc-events cannot decode unicode characters properly. This is because
getString
internally usesnBytes
, which reads bytes as[Word8]
and turns it intoString
usingchr
. In this PRgetString
is replaced withgetTextNul
and it uses text'sdecodeUtf8'
instead.