• 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: Unicode and NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unicode and NSTextView


  • Subject: Re: Unicode and NSTextView
  • From: Chris Hanson <email@hidden>
  • Date: Fri, 22 Aug 2003 11:50:54 -0500

On Friday, August 22, 2003, at 08:01 AM, Timothy Larkin wrote:
I get the o-macron into the string by inserting an NSString constant. Since I can make o-macron directly with Pop-char, I define in the source @"<o-macron>".

Stop right there. Objective-C source code files are 7-bit ASCII. You can't reliably put 8-bit characters of any sort in them.

You should either use a direct character constant (i.e. unichar x = 0x014d) or you should use the localization mechanism and put the o-macron in a localized string.

I have not been able to find any other way to insert a high unicode character into a string besides entering the character directly as a constant NSString. If I try to use a \u format control, the compiler tells me that it doesn't know what a \u format control is.

That's because the Objective-C language doesn't define a \u format control. That's a Java thing.

-- Chris

--
Chris Hanson, bDistributed.com, Inc. | Email: email@hidden
Custom Mac OS X Development | Phone: +1-847-372-3955
http://bdistributed.com/ | Fax: +1-847-589-3738
http://bdistributed.com/Articles/ | Personal Email: email@hidden
_______________________________________________
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: Unicode and NSTextView
      • From: "Alastair J.Houghton" <email@hidden>
References: 
 >Unicode and NSTextView (From: Timothy Larkin <email@hidden>)

  • Prev by Date: Re: Composing a darker image
  • Next by Date: NSFormatter isPartialStringValid confusion
  • Previous by thread: Re: Unicode and NSTextView
  • Next by thread: Re: Unicode and NSTextView
  • Index(es):
    • Date
    • Thread