fix a bug that when ascii value of a character is over 128, the converted value become negative.