Skip to content

ByteString.Char8 damages Unicode

import Data.Bytestring.Char8
unpack (pack "тест") == "тест"
-- False, should be True 
Data.ByteString.Char8.length $ pack "тест"
-- 4, should be 8 (UTF-8). Library truncates more-than-8bit chars

I'm not sure if this library should assume UTF-8 for {en,de}coding, but imho something has to be done about it.

Trac metadata
Trac field Value
Version
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries (other)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information