Skip to content

Commit

Permalink
Merge pull request #1712 from Hecate2/master
Browse files Browse the repository at this point in the history
encoding='utf-8' for reading contracts
  • Loading branch information
iamdefinitelyahuman committed Jan 29, 2024
2 parents e894aa9 + e055f24 commit 86350fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Optimisim (fixed explorer support)
- Gnosis Chain

### Fixed
- Force using utf-8 for reading contracts

## [1.19.3](https://github.com/eth-brownie/brownie/tree/v1.19.3) - 2023-01-29
### Added
- Ganache 7.7.x support ([#1652](https://github.com/eth-brownie/brownie/pull/1652))
Expand Down
2 changes: 1 addition & 1 deletion brownie/project/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,7 +1026,7 @@ def _load_sources(project_path: Path, subfolder: str, allow_json: bool) -> Dict:
continue
if next((i for i in path.relative_to(project_path).parts if i.startswith("_")), False):
continue
with path.open() as fp:
with path.open(encoding='utf-8') as fp:
source = fp.read()

if hasattr(hooks, "brownie_load_source"):
Expand Down

0 comments on commit 86350fb

Please sign in to comment.