[PATCH] Better encoding/decoding for GHC
Ian Lynagh
igloo at earth.li
Tue May 24 03:16:00 CEST 2011
On Wed, May 18, 2011 at 11:14:08PM +0100, Max Bolingbroke wrote:
> On 18 May 2011 22:54, Mark Lentczner <mark.lentczner at gmail.com> wrote:
> > The range is U+EF80 through U+EFFF, called "Reserved for encoding hacks".
>
> OK, I've applied another patch so we match this.
So how do I fix the "rm a*" program below now? (if there are some docs
somewhere explaining it, please just point me at them).
$ touch `printf "a1\243a"`
$ ls -b a*
a1\243a
$ cat q.hs
import Data.List
import System.Directory
main :: IO ()
main = do xs <- getDirectoryContents "."
let ys = filter ("a" `isPrefixOf`) xs
print ys
mapM_ removeFile ys
$ ghc --make q
$ ./q
["a1\61347a"]
q: a1�a: removeLink: does not exist (No such file or directory)
$ ls -b a*
a1\243a
$
Thanks
Ian
More information about the Cvs-ghc
mailing list