eliben / pycparser

:snake: Complete C99 parser in pure Python
Other
3.21k stars 611 forks source link

Add an encoding parameter to parse_file #486

Closed jordr closed 1 year ago

jordr commented 1 year ago

We may need to process files written on/output by compilers on a system with a different locale.getencoding(), which is the default of open().

This patch exposes the encoding optional parameter of open to the parse_file API.