The comma that inflated every European price by 100x

A price parser that stripped commas read the German 9,99 € as 999. Nothing crashed, nothing looked wrong, and the revenue model quietly reported figures a hundred times too large.

Prices are the one input where an order-of-magnitude error looks completely plausible on a chart. A subscription app showing $6,499 a year is absurd if you stop and think, and entirely unremarkable if you are scanning a dashboard.

What the code did

The parser stripped thousands separators before matching digits, which is correct for English and wrong for most of Europe. The German storefront prints 9,99 €, the comma is the decimal point, and removing it produces 999.

Because the revenue model reads the price ladder from whichever storefront is on screen, opening a tracked app on the German tab fed it an anchor price of 6,499 instead of 44.36. A 147x overstatement, with no error, no warning and no visible symptom.

The fix, and why locale detection was the wrong answer

The obvious repair is to look up the storefront and apply its convention. We did not, because the parser is also handed strings whose origin it cannot be sure of, and a lookup that silently falls back to English recreates the bug in a harder-to-find form.

Instead the decimal separator is decided by position. If both a dot and a comma appear, the rightmost is the decimal point: 1.234,56 and 1,234.56 both parse correctly with no idea which country they came from. If only one appears, it is a thousands separator when exactly three digits follow it, and a decimal point otherwise.

The same bug, wearing a different suffix

Then Indonesia. Apple prints 829,000 rupiah as "Rp 829ribu", where ribu is Indonesian for thousand. Read literally that is 829 rupiah, about five US cents, which against a $69.99 American price would have been published as the most dramatic localisation finding on the screen.

Magnitude words are now handled. But that table can never be complete, because any storefront may print a word nobody on this end has seen, so there is also a floor: a price converting to under 2% of the base market is withheld as unreliable rather than published. The cheapest genuine market we measure, Türkiye, sits at 5%, so the guard catches order-of-magnitude errors without second-guessing real pricing.

Related

Blog · Case studies · Free ASO tools · Products · Privacy and terms · AsoTheory