Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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




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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.