Cocoa で、特殊文字を含む文字列を引数として NSTask に渡したいのですが、タスクが適切な文字列を取得しません。
NSString *city=@"Zürich"; // This is the string with a special character
[arguments addObject:[NSString stringWithFormat:@"-iptc:city=%@",city]];
NSTask *task=[NSTask new];
[task setLaunchPath:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"exiftool"]];
[arguments addObjectsFromArray:[NSArray arrayWithObjects:@"-L",@"-overwrite_original_in_place",@"filename", nil]];
[task setArguments:arguments];
[task setStandardOutput:[NSPipe pipe]];
[task launch];
タスクは引数として Zürich を取得しませんが、Zürich を取得します。特殊文字を含む文字列を適切に渡す方法はありますか? UTF8String を試しましたが、成功しませんでした。ありがとう。