Skip to content

Commit

Permalink
Force using utf-8 for reading contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
Hecate2 committed Sep 28, 2023
1 parent bc7b511 commit e055f24
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 e055f24

Please sign in to comment.