cast char to unsigned char for isalnum() in order to avoid invalid array
subscript.