I have a C string, it is encoded with UTF-7, like "+g0l6P3ux-".
I can decode the string with Python. But when I use:
[NSString stringWithCString:"+g0l6P3ux-" encoding:kCFStringEncodingUTF7];
it returns nil, why ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The function you use
expects NSStringEncoding, and if you look up NSStringEncoding in the docs, kCFStringEncodingUTF7 is not a valid value.
Instead of
you could use