behaviour change in getDirectoryContents in GHC 7.2?
marlowsd at gmail.com
Wed Nov 9 17:45:47 CET 2011
On 09/11/2011 15:58, Max Bolingbroke wrote:
> (Note that the above outlined problems are problems in the current
> implementation too -- but the current implementation doesn't even
> pretend to support U+EFxx characters. Its correctness is entirely
> dependent on them never showing up, which is why we chose a part of
> the private codepoint region that is reserved specifically for the
> purpose of encoding hacks).
But we can't make that assumption, because the user might have
accidentally set the locale wrong and then all kinds of garbage will
show up in decoded file paths. I think it's important that programs
that just traverse the file system keep working under those conditions,
rather than randomly failing due to (encode . decode) being almost but
not quite the identity.
More information about the Glasgow-haskell-users