[Pkg-haskell-maintainers] Bug#678282: System.IO.Binary drops binary data when reading to a String

Joey Hess joeyh at debian.org
Wed Jun 20 15:41:55 UTC 2012


Package: libghc-missingh-dev
Version: 1.1.0.3-6+b3
Severity: normal

# cat foo.hs
import System.IO.Binary
import Data.Word

main = do
	s <- getBufStr 10 :: IO String
	print s

# perl -e 'print "a\xb4a\n"' | runghc foo.hs     
"aa\n"

If it instead reads to a [Word8], the data comes through correctly.

The instance of BinaryConvertable for Char seems to be throwing out
invalid utf-8.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-2-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libghc-missingh-dev depends on:
ii  ghc [libghc-unix-dev-2.5.1.0-b1af7]                        7.4.1-3
ii  libc6                                                      2.13-32
ii  libffi5                                                    3.0.10-3
ii  libghc-array-dev-0.4.0.0-0b32f                             <none>
ii  libghc-base-dev-4.5.0.0-c8e71                              <none>
ii  libghc-containers-dev-0.4.2.1-7c545                        <none>
ii  libghc-directory-dev-1.1.0.2-89575                         <none>
ii  libghc-filepath-dev-1.3.0.0-674b8                          <none>
ii  libghc-hslogger-dev [libghc-hslogger-dev-1.1.4-94350]      1.1.4+dfsg1-2+b3
ii  libghc-hunit-dev [libghc-hunit-dev-1.2.4.2-6a847]          1.2.4.2-2+b1
ii  libghc-mtl-dev [libghc-mtl-dev-2.1.1-ae9b4]                2.1.1-1
ii  libghc-network-dev [libghc-network-dev-2.3.0.13-6b330]     2.3.0.13-1+b2
ii  libghc-old-locale-dev-1.0.0.4-29bd5                        <none>
ii  libghc-old-time-dev-1.1.0.0-681e9                          <none>
ii  libghc-parsec3-dev [libghc-parsec-dev-3.1.2-ad4f8]         3.1.2-1+b3
ii  libghc-process-dev-1.1.0.1-91185                           <none>
ii  libghc-random-dev [libghc-random-dev-1.0.1.1-3bece]        1.0.1.1-1+b1
ii  libghc-regex-compat-dev [libghc-regex-compat-dev-0.95.1-c  0.95.1-2+b1
ii  libgmp10                                                   2:5.0.5+dfsg-1.1

libghc-missingh-dev recommends no packages.

Versions of packages libghc-missingh-dev suggests:
ii  libghc-missingh-doc   1.1.0.3-6
ii  libghc-missingh-prof  1.1.0.3-6+b3

-- no debconf information

-- 
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-haskell-maintainers/attachments/20120620/4e12f194/attachment.pgp>


More information about the Pkg-haskell-maintainers mailing list