-1
如何将NSString转换为UTF8Encode?将字符串转换为UTF8
我的NSLog打印相同的结果,输入字符串
NSString* username [email protected]"MYUSERNAME";
username=[username stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSString* Password [email protected]"MYUSERNAMEPASS";
Password=[Password stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
NSLog(@"username=%@",username);
NSLog(@"Password=%@",Password);
添加特殊字符“%20”或一些类似这样的,并再次检查。 –
是否要在字符串中添加%或者是否要从字符串中移除%? – user3182143