• 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: saving files/folders in foreign language names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saving files/folders in foreign language names


  • Subject: Re: saving files/folders in foreign language names
  • From: Navneet Kumar <email@hidden>
  • Date: Tue, 01 Sep 2009 05:39:29 +0530

Hi,
Thanks for the reply.
Actually my program is a finder like program, which saves file (in path hierarchy).
And the hierarchy I mentioned earlier is the actual hierarchy on the user's file system.
I'm not hard coding anything.


What I think is happening is that NSFM's changeCurrentDirectoryPath: is failing, leading to a zero byte file.

Thanks,
Nick

On 01-Sep-09, at 5:27 AM, Kyle Sluder wrote:

What does foreign language have to do with it?  Are you perhaps using
accented characters like é in your pathnames?  You need to be very
careful when doing that, because the filesystem stores it in
decomposed form as e + ´, whereas if you've hardcoded this path in
your code (or strings file), you will try to access it as the composed
form é.

So in short, don't do this.  Use low-ASCII characters in all of your
hardcoded paths, and localize the directory if the user might see it.
The documentation has more information on localized pathnames:
http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPInternational/Articles/LocalizingPathnames.html

--Kyle Sluder

_______________________________________________

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


References: 
 >saving files/folders in foreign language names (From: Nick Rogers <email@hidden>)
 >Re: saving files/folders in foreign language names (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: saving files/folders in foreign language names
  • Next by Date: Re: Core Data observer exception in 10.6
  • Previous by thread: Re: saving files/folders in foreign language names
  • Next by thread: How can file packages become unpackaged?
  • Index(es):
    • Date
    • Thread