<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 29, 2016 at 11:31 AM, Dennis Raddle <span dir="ltr"><<a href="mailto:dennis.raddle@gmail.com" target="_blank">dennis.raddle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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:<div><br></div><div>writeFilePaths :: FilePath -> [FilePath] -> IO ()</div><div>writeFilePaths fileToWrite fps = ...</div><div><br></div><div>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)</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>D</div><div><br></div></font></span></div>
<br></blockquote><div><br></div><div>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:</div><div><br></div><div>export LANG=en_US.UTF-8</div><div><br></div><div>in the shell (assuming you're on a POSIX system, Windows will behave differently).</div><div><br></div><div>Michael </div></div></div></div>