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: Quick way to convert hex string represented in ASCII to binary?



Well none of this stuff worked so I ended up writing my own categories, NSData unicharHexStringFromData and NSString dataFromUnicharHexString that convert and restore NSData into unicode hex strings. I can send them through HTTP to PHP scripts without error, save them in a database, call them back and convert them back to NSData. May not be the most elegant solution but it's the only thing that worked. Even NSData description messed with data in a way that was impossible to restore.

Ken


On Jul 29, 2006, at 5:28 AM, Andreas Mayer wrote:


Am 29.07.2006 um 11:07 Uhr schrieb Ken Tozier:

I was just checking NSPropertyListSerialization out but I'm not sure it will work in my situation. Would the XML data be surrounded by start and end tags?

I don't know. Why don't you test it yourself.

If so, it won't work for me.

Why not? It's still just ASCII.

You could also try to use NSPropertyListOpenStepFormat instead of NSPropertyListXMLFormat_v1_0.

Would some sort of NSCoder be able to do this?

I don't think that an NSCoder is what you want. You may want to read this for more information:


http://developer.apple.com/documentation/Cocoa/Conceptual/Archiving/ Archiving.html


Andreas
_______________________________________________
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/kentozier% 40comcast.net


This email sent to email@hidden

_______________________________________________ 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: 
 >Fwd: Quick way to convert hex string represented in ASCII to binary? (From: Ken Tozier <email@hidden>)
 >Re: Quick way to convert hex string represented in ASCII to binary? (From: Andreas Mayer <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.