💸 Currency crash - but not the kind you’re thinking about
- Jeff Ranasinghe
- Jun 15
- 2 min read
Updated: 12 minutes ago

This one’s for the devs.
Or anyone who’s ever tried to parse a price string from an app store and thought, “Wait… what even is this character?”
So here’s the setup:
You're working on an app that displays pricing info. Maybe you're feeding it through an IAP system, a store, a checkout, whatever. Your backend happily returns $69.99 and all seems well – until one day, your app quietly implodes in the hands of someone in the UK, France, or Korea.
Turns out: foreign currency formats are a warzone.
Let’s play spot the bug:
$69.99 – 🇨🇦🇺🇸 typical, clean, and predictable.
£69.99 – 🇬🇧 not a big deal… unless your parsing doesn’t expect £.
69.99€ – 🇪🇺 now the symbol’s after the number. Still fine… right?
69,99Kr. – 🇸🇪 hello punctuation! That’s a comma instead of a decimal point, and a decimal point as part of the currency symbol. You crash now?
₩69,990 – 🇰🇷 no decimals because the currency is so granular. But now the comma means something else entirely. You were splitting on commas, weren’t you?
This is one of those bugs that can:
Work perfectly in dev.
Mostly work in QA.
Randomly explode in production.
Quietly reappears six months later because someone rewrote the formatter.
The Real Problem
This kind of currency crash is not just a parsing issue. It’s a cultural formatting issue.
Decimal delimiters and currency symbol placement aren’t universal. If you’re manually cleaning strings (e.g. using regex to strip symbols and convert strings to Doubles), you are probably doing it wrong.x
And even if you were doing it right… until you hit ₩69,990. Then suddenly that comma is a thousands separator, not a decimal, and now Double("69.990") gives you the wrong number entirely.
How to fix a currency crash?
Test, test, test. Yes there are number formatters out there, but throw in something like Swift/C++ interop and you have lots of places for things to fall through.
Do not assume . means decimal and , means separator. It depends on the region.
Don’t blindly filter out non-digit characters.
Did I mention test?
Photo credit: Arthur A
Commentaires