On branch swig-py3: Revert a Python 3 only usage.
* build/generator/gen_base.py
(IncludeDependencyInfo._scan_for_includes):
Drop the Python 3 only "errors" argument to fileinput.hook_encoded().
@@ -1322,7 +1322,7 @@ class IncludeDependencyInfo:
values."""
hdrs = { }
- for line in fileinput.FileInput(fname, openhook=fileinput.hook_encoded("utf-8", "surrogateescape")):
+ for line in fileinput.FileInput(fname, openhook=fileinput.hook_encoded("utf-8")):
match = self._re_include.match(line)
if not match:
continue
