• 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
Filenames with Umlauts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Filenames with Umlauts


  • Subject: Filenames with Umlauts
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sat, 5 Jul 2003 11:28:30 +0200

Currently I use this (rather lengthy) way to get a file:

NSBundle *mainBundle = [ NSBundle mainBundle ] ;

// the @ in the next line is a a-umlaut, aka 'latin small letter a with diaresis'; cocoa-dev can not handle unicode.
// this works, because my source file is in utf-8 format.
const char bear_utf8[] = "B@r" ; // a German animal

NSString *bear_precomp = [ NSString stringWithUTF8String: bear_utf8 ] ;
NSString *bear_decomp = [ bear_precomp decomposedStringWithCanonicalMapping ];

// the bear is now called: "Ba 'combining diaresis' r"
NSString *bear_path = [ mainBundle pathForResource: bear_decomp ofType: nil ] ;

Is there a shorter or better way to get at my bear?

Is decomposedStringWithCanonicalMapping the correct method?
There is also decomposedStringWithCompatibilityMapping (which uses the Unicode Normalization Form KD, as opposed to Normalization Form D).
What is the difference, and which method is used in the file system?

Gerriet.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Filenames with Umlauts
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Problem with "isMovableByWindowBackground" for "Metal" windows
  • Next by Date: Big Binary Files in PB
  • Previous by thread: Problem with "isMovableByWindowBackground" for "Metal" windows
  • Next by thread: Re: Filenames with Umlauts
  • Index(es):
    • Date
    • Thread