• 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: Umlaute in NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Umlaute in NSString


  • Subject: Re: Umlaute in NSString
  • From: Nick Zitzmann <email@hidden>
  • Date: Mon, 22 Mar 2004 08:54:28 -0700

On Mar 22, 2004, at 8:19 AM, Michael Becker wrote:

(The umlaut turns into a square-root-sign and a degree-sign)

I am not really familiar with character encodings, so could somebody please tell me how to get rid of this and make the application draw the correct umlaut?

Unfortunately, this list eats non-ASCII characters in message bodies, so I don't think we got the message as you probably intended it. Anyway, NSString constants written in code using @"" may only contain ASCII characters, so if you tried to write a character with an umlaut in one of them, then I'm not surprised that it didn't work.

There are two ways to do this:

1. Use NSLocalizedString() and friends with an ASCII key to get a non-ASCII string
2. Use NSString's -stringWithCharacters: method like this:
unichar lowercaseUmlautU = 252; // the Unicode value of character "LATIN SMALL LETTER U WITH DIAERESIS"
NSString *theString = [NSString stringWithFormat:@"U-Umlaut: %@", [NSString stringWithCharacters:&lowercaseUmlautU length:1]];

Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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: Umlaute in NSString
      • From: Michael Becker <email@hidden>
References: 
 >Umlaute in NSString (From: Michael Becker <email@hidden>)

  • Prev by Date: Re: Umlaute in NSString
  • Next by Date: Re: Graphite examples ??
  • Previous by thread: Re: Umlaute in NSString
  • Next by thread: Re: Umlaute in NSString
  • Index(es):
    • Date
    • Thread