Skip to content

Commit

Permalink
Set default encoding as Latin1
Browse files Browse the repository at this point in the history
So re2 can be used as a drop-in replacement for re when searching for raw bytes

Reported here months ago: axiak#38
  • Loading branch information
spender-sandbox authored Jul 19, 2016
1 parent 89e0b25 commit 9491a0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/re2.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ def _compile(pattern, int flags=0, int max_mem=8388608):

opts.set_max_mem(max_mem)
opts.set_log_errors(0)
opts.set_encoding(_re2.EncodingUTF8)
opts.set_encoding(_re2.EncodingLatin1)

# We use this function to get the proper length of the string.

Expand Down

0 comments on commit 9491a0a

Please sign in to comment.