My unicode is \u20AC
when I set it on UILabel
but I'm getting unicode on label. Some time it is printing euro but mostly it is printing unicode on label.
My code is over here
NSLog(@"Currecy %@",currencySymbol); UILabel *priceLbl = [[UILabel alloc] initWithFrame:CGRectMake(180, 10, 45, 25)]; priceLbl.textColor = [UIColor whiteColor]; priceLbl.textAlignment = NSTextAlignmentCenter; priceLbl.font = [UIFont fontWithName:@"ProximaNova-Bold" size:15]; priceLbl.tag = 1001; fair = [NSString stringWithFormat:@"%d",arc4random()%50]; priceLbl.text = [NSString stringWithFormat:@"%@ %@",fair,currencySymbol];
OutputCurrecy \u20AC
Printing description of priceLbl:<UILabel: 0x7faade3095a0; frame = (185 10; 50 25); text = '\u20AC'; userInteractionEnabled = NO; tag = 1001; layer = <_UILabelLayer: 0x7faadbd91bb0>>
Image may be NSFW.
Clik here to view.
And I'm trying to set at my end getting output as I would like. for example
Image may be NSFW.
Clik here to view.
Getting server response
{ currency = "\\u20AC"; description = "You have been successfully logged in.";}and the currency symbol replacing "\\" with "\"NSString *currency = [response[@"currency"] stringByReplacingOccurrencesOfString:@"\\\\" withString:@"\\"];