def _prepare_regex_pattern(self, p):
if isinstance(p.pattern, str):<EOL><INDENT>p = re.compile(p.pattern.encode('<STR_LIT:utf-8>'), p.flags &~ re.UNICODE)<EOL><DEDENT>return p<EOL>
Recompile unicode regexes as bytes regexes. Overridden in subclass.