• 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 files?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Renaming files? (From: Christoffer Lerno <email@hidden>)
 >Re: Renaming files? (From: Clark Cox <email@hidden>)
 >Re: Renaming files? (From: Christoffer Lerno <email@hidden>)
 >Re: Renaming files? (From: Clark Cox <email@hidden>)

  • Prev by Date: Re: Renaming files?
  • Next by Date: NSTableView Drag and Drop with Bindings
  • Previous by thread: Re: Renaming files?
  • Next by thread: Re: Renaming files?
  • Index(es):
    • Date
    • Thread