Re: Renaming files?
Re: Renaming files?
- Subject: Re: Renaming files?
- From: Christoffer Lerno <email@hidden>
- Date: Wed, 22 Dec 2004 10:41:58 +0100
On Dec 21, 2004, at 15:27, Clark Cox wrote:
On Tue, 21 Dec 2004 12:20:29 +0100, Christoffer Lerno <email@hidden>
wrote:
[snip]
NSString *destinationPath = [@"~/Desktop/å ä ö.txt"
stringByExpandingTildeInPath];
Don't ever use non-ASCII characters in the @"" syntax.
This is just an example to show how the renaming works (looking at the
file in the finder it is definately named "å ä ö.txt" afterwards). Just
doing this using input from a text-field would yield the same result.
It looks like the problem is that the file-system uses a different
encoding from whatever encoding I get when I use a NSTextField and
enter text.
Something like this:
NSTextField (encoding 1) -> NSFileManager move -> filename (encoding 2)
filename (encoding 2) -> NSFileManager -> directory listing or whatever.
Basically [string A with encoding 1 isEqualToString:string A with
encoding 2] == NO for many strings with non-ASCII.
/Christoffer
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden