eth-brownie / brownie

A Python-based development and testing framework for smart contracts targeting the Ethereum Virtual Machine.
https://eth-brownie.readthedocs.io
MIT License
2.65k stars 552 forks source link

encoding='utf-8' for reading contracts #1712

Closed Hecate2 closed 9 months ago

Hecate2 commented 1 year ago

What I did

On Windows without utf-8 encoding by default, there can be errors like UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 52: illegal multibyte sequence when contracts are being read. Related issue: None

How I did it

Using encoding='utf-8' for contracts

How to verify it

I cloned https://github.com/RockX-SG/stake and made brownie work with the contracts on Windows 10.

Checklist

iamdefinitelyahuman commented 9 months ago

Pretty straightforward fix, thanks