behaviour change in getDirectoryContents in GHC 7.2?
igloo at earth.li
Mon Nov 7 18:57:44 CET 2011
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'
Both of those filenames get encoded as \61312 (U+EF80).
More information about the Glasgow-haskell-users