[GHC] #3797: ByteString.Char8 damages Unicode
GHC
trac at galois.com
Thu Dec 31 15:40:47 EST 2009
#3797: ByteString.Char8 damages Unicode
---------------------------------+------------------------------------------
Reporter: Voker57 | Owner:
Type: bug | Status: new
Priority: normal | Component: libraries (other)
Version: | Keywords: bytestring
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: Other
---------------------------------+------------------------------------------
{{{
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.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3797>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list