use wxCharTypeBuffer replace unsigned char pointer