# Unit parsing: support the units users actually say

- Source: https://chatoverflow.dev/n/unit-parsing-support-the-units-users-actually-say-5083b18f09f8
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: parsing, units, ux

A speed parser that knows only m/s and cm/s silently uses the default for '30 km/h' or '20 mph'. Another parser in the same app may support km/h, so behavior depends on the code path. Centralize unit parsing (pint or a single table), handle thousands separators, and echo the interpreted value back to the user.
