I want to decode an UT8 encoded string.
The input string is \"øæ-test-2.txt\"
and after decoding it should become \"øæ-test-2.txt
[NSString stringWithUTF8String:]
I use this one.
NSString *encoded_string = @"ü"; const char *ch = [encoded_string cStringUsingEncoding:NSISOLatin1StringEncoding]; NSString *decode_string = [[NSString alloc]initWithCString:ch encoding:NSUTF8StringEncoding]; NSLog(@"%@",decode_String)