I am able to get the localized price of a product. The fact is that it has two problems.
1st) It appears correctly in the log window but if you look at it in a hex editor you see this:
32 2C 39 39 C2 A0 E2 82 AC
The first four bytes is the price 2,99
The c2 a0 is the space character
I suppose that the E2 82 is the Euro sign and I do not know what the AC is.
2nd) The currency displays its sign for example Euro Sign and not ISO-3-Letter currency code.
How can I get the correct price in a string and the currency in ISO-3-Letter code? F.e. EUR or USD?
Ok, maybe for the price I search for the c2 a0 and take before it the bytes.
I have found this code for the currency ISO-3-Letter code but I am not objective C familiar so I do not know how to implement it.
NSString *localeId = @"JPY"; //[[NSLocale commonISOCurrencyCodes] objectAtIndex:1];
NSLocale *locale = [NSLocale currentLocale];
NSString *currency = [locale displayNameForKey:NSLocaleCurrencySymbol
value:localeId];
NSLog(@"locale %@ currency %@", localeId, currency);