[Haskell-beginners] string -> bytestring

Christopher Howard christopher.howard at frigidcode.com
Tue Jan 1 21:41:45 CET 2013


On 01/01/2013 04:31 AM, Mateusz Kowalczyk wrote:
> See the answer to
> http://stackoverflow.com/questions/12576817/couldnt-match-expected-type-with-actual-type-error-when-using-codec-bmp
> 
> 
> In the future, provide a small code snippet as well so that anyone
> helping can easily point out where you're messing up.
> 
> On 01/01/13 12:03, Iustin Pop wrote:
> 
> 
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners

With some more research, I figured it out: The problem was, it seems,
that 8 bit ByteStrings are not the same as UTF8 ByteStrings. So I used
the pack function from Data.ByteString.Char8, and this compiles fine.

-- 
frigidcode.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 553 bytes
Desc: OpenPGP digital signature
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130101/b6bdbb95/attachment.pgp>


More information about the Beginners mailing list