ensure char conversions would not lose precision