About Store Forum Documentation Contact



Post Reply 
currency symbols
Author Message
yvanvds Offline
Member

Post: #1
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
Find all posts by this user Quote this message in a reply
MrPi Offline
Member

Post: #2
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
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #3
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
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
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;
}
wink
04-12-2014 10:42 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #5
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 smile
(This post was last modified: 04-13-2014 03:07 PM by yvanvds.)
04-13-2014 03:07 PM
Find all posts by this user Quote this message in a reply
MrPi Offline
Member

Post: #6
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
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #7
RE: currency symbols
I couldn't resist checking that out smile

Seems that there is no official standard for it, but all countries have their own standard. Here in Belgium I'm supposed to do what I wrote above, but there seem to be differences in other countries. I wouldn't count on streets shops to check their grammar though pfft
04-13-2014 04:19 PM
Find all posts by this user Quote this message in a reply
psyco001 Offline
Member

Post: #8
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
Find all posts by this user Quote this message in a reply
Post Reply