[Haskell-beginners] error writing FilePath to text file

Dennis Raddle dennis.raddle at gmail.com
Wed Jun 29 08:20:47 UTC 2016


Hello, I wrote a program that reads filenames using System.Directory
"listDirectory", does some tests on them, and writes certain file names (as
read into a FilePath variable by listDirectory) to a text file, which I
later parse with Parsec.  I am getting an error on writing to the text file:

commitBuffer: invalid argument (invalid character)

What can I do about this? If I am reading some kind of unusual characters
from the FilePath, I want to choose some way of writing them so that the
resulting file can still be parsed by Text.Parsec.ByteString. I hope that I
can still rely on the "space" parser to find CR and LF, and don't want any
other surprises.

D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160629/1e5179f7/attachment.html>


More information about the Beginners mailing list