开发者

Decode base64 array of bytes to txt file - iPhone

I'm geting an array of bytes (it's a txt file) from a server that I need to save at my app's documents folder. I,ve tried many solutions I found and I managed to save the file, but the encoding appears to be wrong, when I try to view the contents of the txt file saved the first line says:

<.base64Binary xmlns="http://schemas.microsoft.com/开发者_C百科2003/10/Serialization/">

...then about 50 lines of random characters until the document ends with:

<./base64Binary>

I've tried decoding the NSData to nsstring using some examples i've found, but none could solve this problem

thanks

I've tried this solutions:

http://www.cocoadev.com/index.pl?BaseSixtyFour

http://cocoawithlove.com/2009/06/base64-encoding-options-on-mac-and.html


Finally solved it!! Using part of the code in

http://cocoawithlove.com/2009/06/base64-encoding-options-on-mac-and.html

into my classes and parsing the xml before encoding.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜