On Wed, Jun 29, 2016 at 11:31 AM, Dennis Raddle <dennis.raddle@gmail.com> wrote:
Thanks. ​I don't know if I was clear that I'm writing the characters of the FilePath to a file. I could use something like:

writeFilePaths :: FilePath -> [FilePath] -> IO ()
writeFilePaths fileToWrite fps = ...

The ByteStrings are for reading the files generated by the above and parsing with Text.Parsec.ByteString, for efficiency (these are many megabytes of text)

D



A FilePath is just a type synonym for a String, so the same caveats will apply to both. I'm guessing that you're dealing with some file paths that have non-ASCII characters in them, and you have some locale environment variables set that do not support UTF8. You can try rerunning your program as-is with:

export LANG=en_US.UTF-8

in the shell (assuming you're on a POSIX system, Windows will behave differently).

Michael