Before start reading the question you've to know this so it'll be easy for you to understand the problem,
I've two strings verrÃ
and verrà
[see last character in both the strings -- the only difference]
I've these two strings verrà blah blah and verrà blah blah. As in my requirement, I need to show verrà blah blah based on condition, so I'll need to convert "verrÃ" to "verrà", I found that its unicode character and I can able to convert it by doing something like below,
//here, strText = @"verrà blah blah";
NSString *correctString = [NSString stringWithCString:[strText cStringUsingEncoding:NSISOLatin1StringEncoding] encoding:NSUTF8StringEncoding];
And it's working correctly for verrà blah blah
, it converts it to verrà blah blah
, But then I found that because of the above code, it stopped converting the already correct string that's verrà blah blah
, because when this already correct string pass to the above code, it will be empty!
What I am doing wrong?