Re: Translating filenames for command line?
Re: Translating filenames for command line?
- Subject: Re: Translating filenames for command line?
- From: Andreas Monitzer <email@hidden>
- Date: Mon, 31 Dec 2001 17:39:14 +0100
On Monday, December 31, 2001, at 05:27 , David Feldman wrote:
The command line seems to want these characters represented as numerical
equivalents (I'm presuming Unicode or ASCII?). For example, when I get
the
shell to auto-complete one of these filenames it represents a bullet as
"\342\200\242" and an ellipsis as "\342\200\246".
However, when these paths are generated by Cocoa the characters are
represented normally. This causes ditto to generate an error, claiming
the
file can't be found (and displaying the filename: the ellipses actually
appear there, but the bullets are shown as Yen symbols).
How do I convert Cocoa's characters to the proper numerical equivalents
so
the command line tools don't choke?
-[NSString fileSystemRepresentation]
And you should try to avoid system() if possible. There are some risks
involved (see iTunes 2.0 installer fiasco).
andy