Attoparsec.ByteString.Char8 or Attoparsec.ByteString for diff output?

Dear Listers, I am developing a program to parse dif output taken from stdin (as in diff file1 file2 | myApp) or from a file. I am reading the input as ByteString in either case and I am parsing it Attoparsec. My question is, Should I use Data.Attoparsec.ByteString.Char8 or Data.Attoparsec.ByteString? So far, I've been using Data.Attoparsec.ByteString.Char8 and it works for my sample files, which are in utf8 or, latin1, or the default Windows encoding. What do you suggest? Regards, Pedro Borges

I send this question to the haskell-cafe list and I've got a couple of answers there. Pedro Borges El 17/2/2023 a las 12:04 p. m., Pedro B. escribió:
Dear Listers,
I am developing a program to parse dif output taken from stdin (as in diff file1 file2 | myApp) or from a file. I am reading the input as ByteString in either case and I am parsing it Attoparsec. My question is, Should I use Data.Attoparsec.ByteString.Char8 or Data.Attoparsec.ByteString?
So far, I've been using Data.Attoparsec.ByteString.Char8 and it works for my sample files, which are in utf8 or, latin1, or the default Windows encoding.
What do you suggest?
Regards,
Pedro Borges

Hi Pedro, I noticed the responses on the cafe list. Hope they helped!
On Mon, Feb 20, 2023 at 9:39 PM Pedro B.
I send this question to the haskell-cafe list and I've got a couple of answers there.
Pedro Borges
El 17/2/2023 a las 12:04 p. m., Pedro B. escribió:
Dear Listers,
I am developing a program to parse dif output taken from stdin (as in diff file1 file2 | myApp) or from a file. I am reading the input as ByteString in either case and I am parsing it Attoparsec. My question is, Should I use Data.Attoparsec.ByteString.Char8 or Data.Attoparsec.ByteString?
So far, I've been using Data.Attoparsec.ByteString.Char8 and it works for my sample files, which are in utf8 or, latin1, or the default Windows encoding.
What do you suggest?
Regards,
Pedro Borges
_______________________________________________ Beginners mailing list Beginners@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
-- -- Kim-Ee
participants (2)
-
Kim-Ee Yeoh
-
Pedro B.