fixed CharInSet VCL emulation method