1.c# generating code for BASE64 strings
String BODY = "{\" title\ ": \" last CVR khaki \ ", \" url\ ": \" Http://www.baidu.com\ "}"; byte[] Bodydata = System.Text.Encoding.Default.GetBytes (body); string Bodybase64 = convert.tobase64string ( Bodydata);
2. I parse the code (habitual notation)
NSData * contentdata=*contentdatajsonstring=[[nsstring alloc] initwithdata:contentdata encoding: Under the nsutf8stringencoding];//test
Out is garbled, I will change the code, changed together or not resolved, and then a think of the national Standard Code, a try gb_2312_80 special or can't parse, the dead horse when live horse medicine
Mentality to try another one of the national standard Code, finally out, and later still need to communicate well, otherwise it will appear this problem, if a start back-end coding with UTF8 will not appear this question
The problem. The following is the revised code (preferably the back end of the code).
NSData * Contentdata=[tool Base64StringtoNSData:mode.content]; Nsstringencoding enc = cfstringconvertencodingtonsstringencoding (kcfstringencodinggb_18030_2000); NSString *contentdatajsonstring=[[nsstring alloc] Initwithdata:contentdata Encoding:enc];
Base64string parsing issues with. NET returned by iOS