Internationally friendly decimal quantities

I was recently in a discussion about decimal / comma ambiguity (it came about as a result of a vendor product not working for me due to regional settings, but that's neither here nor there), but we can to an interesting conclusion: how does one specify what decimal / separators / units to use when entering things into an online form, as an example?

I'm specifically thinking of a situation where the form expects you to enter a decimal quantity, say for a "dimensions" or "length" in the case that something you are ordering supports it.

The image below shows four versions, the top of which is pretty standard, then the 3 others being different modifications to accommodate internationalization.

In the case of each, I would expect the application (in this case) to offer the user a selection between "Metric" and "Imperial" measurements, which it could then do some back-end math to convert to a unified unit (probably convert imperial to cm, with up to 3 decimals for precision, but we'll ignore storage for the moment).

The third version seems best to me: it allows the user to be precise with their measurements, and eliminates decimal / unit ambiguity. The user doesn't need to convert their measurements between units, as the application knows the unit they expected with the measurement.

Metric is on the left, Imperial on the right. In all cases we want 1 and 1/4 of the base unit, 1m 25cm for Metric, or 1ft 3in for Imperial.

Examples