This content has been marked as final. Show 2 replies
It does have the appearance of a bug. In your demo, I replaced the lines that failed (inside the @try) with these:
NSString* content3 = [content substringFromIndex: 1]; NSString* content4 = [content substringToIndex: 1]; NSData *data3 = [content3 dataUsingEncoding:encoding allowLossyConversion:YES]; NSLog(@"data3: %@", data3); NSData *data4 = [content4 dataUsingEncoding:encoding allowLossyConversion:YES]; NSLog(@"data4: %@", data4);
and that works correctly (and could be the basis of a workaround). You should submit a bug report with your sample project.