On Jan 5, 2012, at 11:00 PM, Peter Zegelin wrote:

> I am trying to save a bookmark into an xml file but am having difficulty 
> converting the bookmark to and from an NSString.

Are you sure bookmarks are textual? From your trouble I’m guessing that they’re 
not, the contents are binary. Trying to read this as a string is not going to 
work.

If you want to store binary data in an XML file, you’ll have to encode it using 
something like base64. For some reason Apple has never seen fit to include a 
public base64 codec API in the OS, but there are a number of open-source 
implementations (it’s only a few pages of code.)

—Jens

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

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to