I got errors when passing strings I got from Cocoa to UNIX or BSD calls…

I got some file names from NSOpenPanel methods and I pass these to UNIX calls like open, but sometimes it fails, I don't understand why...
You probably pass the NSString you got from some Cocoa API to the Unix function using cString instead of UTF8String: if the file name contains non-ASCII characters - and this is very likely to happen if you have some European users of your program - cString will not return a correct representation of the filename, and UNIX calls will probably report a file not found.
This is if you are lucky, if you are not, it may also simply open another file whose name is different at Finder level but the same once converted to the "C" representation.