CXX-277 Cast to unsigned to allow large char value