issue 2795: python 3 fix in Rust C header gen

The C header generation script was failing with a unicode error
in Python 3 on FreeBSD.  Fix the reading of files to properly
handle unicode in all Python 3 environments.

Redmine issue:
https://redmine.openinfosecfoundation.org/issues/2794
pull/3662/head
Jason Ish 6 years ago committed by Victor Julien
parent 0c1254738e
commit ee32c098d1

@ -169,7 +169,7 @@ def gen_headers(filename):
if not should_regen(filename, output_filename):
return
buf = open(filename).read()
buf = open(filename, "rb").read().decode("utf-8")
writer = StringIO()
for fn in re.findall(

Loading…
Cancel
Save