Project

General

Profile

Actions

Bug #2794

closed

Python 3 unicode issue in Rust C header generator on FreeBSD

Added by Jason Ish almost 6 years ago. Updated almost 6 years 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.

Actions #1

Updated by Victor Julien almost 6 years ago

  • Target version set to 4.0.7
Actions #2

Updated by Victor Julien almost 6 years ago

  • Status changed from Assigned to Closed
Actions

Also available in: Atom PDF