Incorrect NSStringEncoding value 0x0000 detected.

 

当一个字符串为null时,它不能被正常地使用,否则会报如下错误

Incorrect NSStringEncoding value 0x0000 detected. Assuming NSASCIIStringEncoding. Will stop this compatiblity mapping behavior in the near future

错误案例:当nstrPublicUrl==null时,如果我们写下如下代码,就会报如上警告。

//错误的案例,nstrPublicUrl==nil时
NSString *nstrUrl = [NSString stringWithFormat:@"%@%@",nstrPublicUrl,ACCOUNT_URL];   

 

你可能感兴趣的:(encoding)