skip dummy encodings & match encoding of regexp to the string encoding