Actions
Bug #2794
closedPython 3 unicode issue in Rust C header generator on FreeBSD
Affected Versions:
Effort:
Difficulty:
Label:
Description
Generating C headers from Rust, with Python 3 on FreeBSD fails with a unicode error:
> cd ../rust && /usr/local/bin/python ./gen-c-headers.py > Traceback (most recent call last): > File "./gen-c-headers.py", line 232, in <module> > sys.exit(main()) > File "./gen-c-headers.py", line 229, in main > gen_headers(path) > File "./gen-c-headers.py", line 172, in gen_headers > buf = open(filename).read() > File "/usr/local/lib/python3.6/encodings/ascii.py", line 26, in decode > return codecs.ascii_decode(input, self.errors)[0] > UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 727: ordinal not in range(128)
This is repeatable with Python 3 as included in FreeBSD 11 and 12.
Python 2 does not generate the error.
This does not appear to affect Python 3 on Linux.
Actions