I would use `'ascii'` instead of `'latin-1'` here to be explicit that we only expect digits.