
Hi Max, On 01/11/2011 10:23, Max Bolingbroke wrote:
This is my implementation of Python's PEP 383 [1] for Haskell.
IMHO this behaviour is much closer to what users expect.For example, getDirectoryContents "." >>= print shows Unicode filenames properly. As a result of this change we were able to close quite a few outstanding GHC bugs.
Many thanks for your reply and all the subsequent followups and bugfixing. The workaround you propose seems a little complex and it might be a bit problematic that 100% roundtripping can't be guaranteed even once your fix is applied. Do you think it would be reasonable/feasible for darcs to have its own version of getDirectoryContents that doesn't try to do any translation in the first place? It might make sense to make a separate package that others could use to. BTW I was trying to find the patch where this changed but couldn't - was it a consequence of https://github.com/ghc/packages-base/commit/509f28cc93b980d30aca37008cbe66c6... ? Cheers, Ganesh