yvanvds
Member
|
currency symbols
Hi.
I was just checking out the NativeStore object. I noticed that the price returned by Google includes a non breaking space and a currency symbol. Both are not recognised by the editor (showing up as ?? in the device log) and of course also not available in the default character set.
I solved this by parsing the price Str char by char and replacing the character 160 by a normal space. And added a lot of currency symbols as custom chars in the font editor.
I have no idea how to add the non breaking space into custom chars, and (I suspect google will always return the currency symbol localized to the device my app is running on?) I don't know if I might have forgotten a few symbols.
So it might be nice to have an extra tickbox in the font editor to include these characters.
Regards,
yvan
|
|
03-19-2014 09:04 PM |
|
MrPi
Member
|
RE: currency symbols
Yeah, you can't add the non-breaking space to the special characters, but replace it when you receive the string. I had to do the same.
price_text.replace(0xA0, ' ');
The currency symbols you require are not much. I only added these 3 for Apple Store: £€¥
|
|
03-22-2014 10:40 AM |
|
yvanvds
Member
|
RE: currency symbols
ah, thanks! I overlooked the replace function and manually iterated over the whole string. (Internally it might be just the same, but it's better to read anyway).
|
|
03-22-2014 01:06 PM |
|
Esenthel
Administrator
|
RE: currency symbols
you can always do:
Code:
Str ReplaceCurrency(Str s)
{
s=Replace(s, "£", "GBP");
s=Replace(s, "€", "EUR");
s=Replace(s, "¥", "JPY");
return s;
}
|
|
04-12-2014 10:42 PM |
|
yvanvds
Member
|
RE: currency symbols
Not really, because € should be placed before the amount, while EUR must be set after.
€ 10 -> correct
10 EUR -> correct
EUR 10 -> wrong
10 € -> wrong
You never know when a linguist downloads your app
(This post was last modified: 04-13-2014 03:07 PM by yvanvds.)
|
|
04-13-2014 03:07 PM |
|
MrPi
Member
|
RE: currency symbols
That's wrong. 10 € is as correct as € 10. Actually in standard street shops you see 10 € much more often.
|
|
04-13-2014 03:26 PM |
|
psyco001
Member
|
RE: currency symbols
before the Euro was introduced and in the beginning of that there was a time where € 99 meant 0.99 € here in Germany.
|
|
04-22-2014 05:43 PM |
|