How did you possibly get this to work? NSTask takes a list of
arguments. These arguments do not need to be shell escaped unless
your NSTask is a shell (ie, tsch, bash, et cetera). If your NSTask
is a shell, that's very, very bad. But you could just enclose the
string with quotes if you're doing such a thing.
I think I know where I went wrong. I am using NSTask in 2 different
ways. Either like this:
Here's the big problem... IIRC, %s interprets the string as the
system encoding. (Which would be either MacFrench or MacRoman in
your case). But -fileSystemRepresentation returns a "UTF-8" string.
So anything that doesn't have the exact same value (such as French
accents) in both encodings are going to get changed and mangled and
you'll get a file not found error.
Well this is how I got it to work. I actually do want the decomposed
characters in my shell script file.