• 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: How would you convert a \r to its UTF-8 counterpart ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How would you convert a \r to its UTF-8 counterpart ?


  • Subject: Re: How would you convert a \r to its UTF-8 counterpart ?
  • From: Michael Nickerson <email@hidden>
  • Date: Fri, 28 Jul 2006 19:32:39 -0400


On Jul 26, 2006, at 3:38 PM, Stéphane Sudre wrote:


Ok, I need to rephrase the question to use the proper terms.

How can I save a string in a plist inside <string></string> tags so that the string is saved with character escaping for the '\r' (and probably '\n') characters?

This is done automatically for the & character.


While it's not automatic, would NSString's - stringByAddingPercentEscapesUsingEncoding: and - stringByReplacingPercentEscapesUsingEncoding: work for you? Admittedly, it's overkill as it'll convert practically everything (including any spaces) - but it'll convert that pesky \r for you while it's at it.




Darkshadow
(aka Michael Nickerson)



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: How would you convert a \r to its UTF-8 counterpart ? (From: Stéphane Sudre <email@hidden>)

  • Prev by Date: Hit-detection via NSApp's -sendEvent:
  • Next by Date: Re: Show/Hide columns in NSTableView?
  • Previous by thread: Re: How would you convert a \r to its UTF-8 counterpart ?
  • Next by thread: Re: How would you convert a \r to its UTF-8 counterpart ?
  • Index(es):
    • Date
    • Thread