dahua: removed warning, properly typecast char* to int, and just use single isalnum function/macro to do the work