[Haskell-cafe] ANNOUNCE: system-filepath 0.4.5 and system-fileio 0.3.4
joey at kitenet.net
Mon Feb 6 22:05:15 CET 2012
John Millikin wrote:
> Perhaps I'm misunderstanding, but the definition of 'withFilePath' you
> provided is definitely locale-dependent. Unless getFileSystemEncoding
> is constant?
I think/hope it's locale dependent, but undecodable bytes are remapped,
so as long as the system's locale doesn't change, reading a FilePath
with the encoding and then writing it back out should always reproduce
the same bytes.
> > Filesystem.Path.CurrentOS.toText is a nice option if you want validly
> > encoded output though. Thanks for that!
> Ah, that's not what toText is for. toText provides a human-readable
> representation of the path. It's used for things like file managers,
> where you need to show the user a label which approximates the
> underlying path. There's no guarantee that the output of toText can be
> converted back to the original path, especially if it returns a Left.
Yes, that's what I meant. :)
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 828 bytes
Desc: Digital signature
More information about the Haskell-Cafe