strdup optarg and add -m option for specifying the Mac charset