[plt-scheme] v299: process* file args, paths, strings, and byte-strings
On Oct 19, 2004, at 6:38 PM, Robby Findler wrote:
> At Tue, 19 Oct 2004 18:33:08 -0400, Richard Cobbe wrote:
>> In this particular situation, I'll almost certainly be fine, because I
>> don't expect /sw/fink/debs to contain any files with names not
>> representable in basic ASCII, but I'm anal^H^H^H^H careful enough to
>> want to get this right in the general case.
>
> I don't have the full answer for you, since I'm not sure what we hook
> into for process*, but I thought I'd point out one thing here.
>
> It turns out that it's not even as bad as you assume. As I understand
> it, there are very few bytes strings that are not representable as
> paths; it's certainly far more than just ASCII that keeps you safe.
I'm not sure that's really relevant -- I'm converting from paths to
(byte) strings, not the other way around.
And, even if there are very few paths that are not representable as
byte strings, I'm not sure that helps. Essentially, when I do
(process* "/sw/bin/dpkg" "-I" (path->string (car (directory-list
"/sw/fink/debs"))))
can I be sure that the composition of path->string with whatever
conversion process* is performing will always give me the file that I
expect?
Richard