On 07/11/2011 17:57, Ian Lynagh wrote:
On Mon, Nov 07, 2011 at 05:02:32PM +0000, Simon Marlow wrote:
Basically, imagine a reversible transformation:
encode :: String -> [Word8]
decode :: [Word8] -> String
this transformation is applied in the appropriate direction by the
IO library to translate filesystem paths into FilePath and vice
versa. No information is lost
I think that would be great if it were true, but it isn't:
$ touch `printf '\x80'`
$ touch `printf '\xEE\xBE\x80'`
$ ghc -e 'System.Directory.getDirectoryContents ".">>= print'
["\61312",".","\61312",".."]
Both of those filenames get encoded as \61312 (U+EF80).
Ouch, I missed that. I was under the impression that we guaranteed
roundtripping, but it seems not.
Max - we need to fix this.
Cheers,
Simon
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users