convert char to int for hadoop