FROM : Andrew Farmer
DATE : Thu Aug 24 18:09:01 2006
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.
DATE : Thu Aug 24 18:09:01 2006
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.
| Related mails | Author | Date |
|---|---|---|
| Martin | Aug 22, 19:04 | |
| Nick Zitzmann | Aug 22, 19:36 | |
| Steve Christensen | Aug 22, 20:43 | |
| Nir Soffer | Aug 24, 13:09 | |
| Andrew Farmer | Aug 24, 18:09 | |
| Nir Soffer | Aug 25, 01:02 |






Cocoa mail archive

