• 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: renaming a file with special/reserved characters in name
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: renaming a file with special/reserved characters in name


  • Subject: Re: renaming a file with special/reserved characters in name
  • From: Shawn Erickson <email@hidden>
  • Date: Sat, 28 Feb 2009 08:49:39 -0800

On Sat, Feb 28, 2009 at 8:07 AM, Michael Ash <email@hidden> wrote:

> $ python -c 'open("hello\xaa\xbb\xccworld", "w")';ls
> helloª»Ìworld

The POSIX APIs on Mac OS X expect UTF-8 paths. The above isn't UTF-8.

Try the following which is the same in UTF-8...

MacPro:~ shawnce$ python -c
'open("working_hello\xc2\xaa\xc2\xbb\xc3\x8cworld", "w")'; ls -l |
grep working_hello
-rw-r--r--   1 shawnce  shawnce     0 Feb 28 08:47 working_helloª»Ìworld

...and fs_usage while trying both of the above...

MacPro:~ shawnce$ sudo fs_usage | grep hello
Password:
08:47:50  open              working_helloª»Ìworld
                                   0.000088   Python
08:47:50  listxattr         ./working_helloª»Ìworld
                                  0.000008   ls

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: renaming a file with special/reserved characters in name
      • From: Michael Ash <email@hidden>
References: 
 >renaming a file with special/reserved characters in name (From: Martin Wierschin <email@hidden>)
 >Re: renaming a file with special/reserved characters in name (From: Michael Ash <email@hidden>)
 >Re: renaming a file with special/reserved characters in name (From: Martin Wierschin <email@hidden>)
 >Re: renaming a file with special/reserved characters in name (From: Michael Ash <email@hidden>)
 >Re: renaming a file with special/reserved characters in name (From: Martin Wierschin <email@hidden>)
 >Re: renaming a file with special/reserved characters in name (From: Ken Thomases <email@hidden>)
 >Re: renaming a file with special/reserved characters in name (From: Martin Wierschin <email@hidden>)
 >Re: renaming a file with special/reserved characters in name (From: Shawn Erickson <email@hidden>)
 >Re: renaming a file with special/reserved characters in name (From: Michael Ash <email@hidden>)

  • Prev by Date: Re: renaming a file with special/reserved characters in name
  • Next by Date: NSTableView and CA backed views
  • Previous by thread: Re: renaming a file with special/reserved characters in name
  • Next by thread: Re: renaming a file with special/reserved characters in name
  • Index(es):
    • Date
    • Thread