Project

General

Profile

Bug #2794

Python 3 unicode issue in Rust C header generator on FreeBSD

Added by Jason Ish 3 months ago. Updated 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
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.

History

#1

Updated by Victor Julien 2 months ago

  • Target version set to 4.0.7
#2

Updated by Victor Julien 2 months ago

  • Status changed from Assigned to Closed

Also available in: Atom PDF