Re: renaming a file with special/reserved characters in name
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