• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Translating filenames for command line?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Translating filenames for command line?
      • From: Finlay Dobbie <email@hidden>
References: 
 >Translating filenames for command line? (From: David Feldman <email@hidden>)

  • Prev by Date: Translating filenames for command line?
  • Next by Date: Re: Input in TextView
  • Previous by thread: Translating filenames for command line?
  • Next by thread: Re: Translating filenames for command line?
  • Index(es):
    • Date
    • Thread