• 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: Hex codes in plists
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Hex codes in plists


  • Subject: Re: Hex codes in plists
  • From: Glen Simmons <email@hidden>
  • Date: Mon, 3 Nov 2003 14:38:29 -0600

On Nov 3, 2003, at 2:34 PM, Nicholas Riley wrote:

On Mon, Nov 03, 2003 at 01:16:04PM -0600, Glen Simmons wrote:
I have some string resources that I've put into plists for easy loading
and accessing. The problem is that quite a few of the string resources
include hex values, i.e. "Foo" = "\x42\x12bar". I sort of assumed that
these would be magically transformed when the
+dictionaryWithContentsOfFile: call created all the NSStrings. Not so.
Any suggestions on how best to deal with these?

Just include the characters directly in the plist. You can use the
character palette and/or Unicode Hex Input method if the characters
are not easily typeable.

I should've mentioned - these are existing resources. Changing hundreds of these by hand is not my idea of fun :). Which is why I was wanting to let the computer do it.


Second question: In trying to deal with this, I had the bright idea of
using -rangeOfString:@"\x" and handling it in code. XCode doesn't like
this at all, thinking it's supposed to be a hex value. How to get
around this?

-rangeOfString:@"\\x" should work.
Shoulda thought of this myself.

Thanks,
Glen
_______________________________________________
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: Hex codes in plists
      • From: Nicholas Riley <email@hidden>
References: 
 >importing PB projects in Xcode (From: Luca Torella <email@hidden>)
 >Hex codes in plists (From: Glen Simmons <email@hidden>)
 >Re: Hex codes in plists (From: Nicholas Riley <email@hidden>)

  • Prev by Date: Re: Hex codes in plists
  • Next by Date: NSURLPboardType broken for dropping files in Panther...?
  • Previous by thread: Re: Hex codes in plists
  • Next by thread: Re: Hex codes in plists
  • Index(es):
    • Date
    • Thread