[darcs-devel] Re: darcs patch: handle filenames with whitespace in annotate (issue65)

Benedikt Schmidt beschmi at cloaked.de
Wed May 17 19:27:46 PDT 2006


Benedikt Schmidt <beschmi at cloaked.de> writes:

[..]
> This patch uses fn2ps_no_escape for converting the FileNames to
> PackedStrings in applyToPop. Another possibility would be using
> FileNames instead of PackedStrings for the nameI and creationNameI
> fields.
[..]
> +{-# INLINE fn2ps_no_escape #-}
> +fn2ps_no_escape :: FileName -> PackedString
> +fn2ps_no_escape (FN fp) = packWords $ encode fp

fn2ps_no_escape (FN fp) = packWords $ map (toEnum.fromEnum) fp

without the UTF8.encode seems to be better since it handles
"darcs annotate <unicode filename>" too.
I'll do some more tests and send a new patch later.

Benedikt





More information about the darcs-devel mailing list