Re: Non-ASCII NSTask arguments
Re: Non-ASCII NSTask arguments
- Subject: Re: Non-ASCII NSTask arguments
- From: Andrew Farmer <email@hidden>
- Date: Thu, 24 Aug 2006 09:09:01 -0700
On 24 Aug 06, at 04:09, Nir Soffer wrote:
You can just send the unicode string as is, It seems that NSTask is
doing the right thing with it.
NSArray *args = [NSArray arrayWithObjects:
@"-l",
@"-v",
[NSString stringWithUTF8String:"/Path/To/שלום"], nil];
[NSTask launchedTaskWithLaunchPath:@"/bin/ls" arguments:args];
That doesn't really prove anything, as the C compiler isn't 8-bit safe.
The real question here, though, isn't "how do you pass Unicode
arguments to NSTask",
as that's trivial - you just pass them in; NSTask doesn't care. The
real issue here
is probably that you're not using -[NSString
fileSystemRepresentation], which will
return a specific encoding of the file name which is equal to the one
used on disk.Attachment:
PGP.sig
Description: This is a digitally signed message part
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden