I am trying to assign string value containing special symbol ‘β’ into Label. But ‘β’ is converted into ‘Œ≤’ in the label.
I have tried like this –
NSString *temp = [[array2 objectAtIndex:0]valueForKey:@"Class"];
NSString *classes = [temp stringByReplacingOccurrencesOfString:@"Œ≤" withString:@"β"];
lblClass.text = classes;
NSString *temp = [lblClass.text stringByReplacingOccurrencesOfString:@"Œ≤" withString:@"β"];
NSLog(@"class is %@",classes);
NSLog(@"class - %@", lblClass.text);
NSLog(@"class - %@", temp);
The values in console are –
2012-07-27 14:50:51.249 MedicationProfilesApp[2539:207] class is Sympathomimetic / β - 2 Agonist / Brochodilator
2012-07-27 14:51:02.198 MedicationProfilesApp[2539:207] class - Sympathomimetic / β - 2 Agonist / Brochodilator
2012-07-27 14:51:03.375 MedicationProfilesApp[2539:207] class - Sympathomimetic / β - 2 Agonist / Brochodilator
What can be the problem ?
Thanks.
Please try below code it may help you