Skip to content

Commit

Permalink
fix encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
willmcgugan committed Oct 26, 2024
1 parent 37eaf23 commit 9023859
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.85.1] - 2024-10-26

### Fixed

- Fixed encoding issue when saving files such as screenshots on Windows

## [0.85.0] - 2024-10-25

### Changed
Expand Down Expand Up @@ -2483,6 +2489,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
- New handler system for messages that doesn't require inheritance
- Improved traceback handling

[0.85.1]: https://github.com/Textualize/textual/compare/v0.85.0...v0.85.1
[0.85.0]: https://github.com/Textualize/textual/compare/v0.84.0...v0.85.0
[0.84.0]: https://github.com/Textualize/textual/compare/v0.83.0...v0.84.0
[0.83.0]: https://github.com/Textualize/textual/compare/v0.82.0...v0.83.0
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "textual"
version = "0.85.0"
version = "0.85.1"
homepage = "https://github.com/Textualize/textual"
repository = "https://github.com/Textualize/textual"
documentation = "https://textual.textualize.io/"
Expand Down
4 changes: 3 additions & 1 deletion src/textual/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ def deliver_binary(

def save_file_thread(binary: BinaryIO | TextIO, mode: str) -> None:
try:
with open(save_path, mode) as destination_file:
with open(
save_path, mode, encoding=encoding or "utf-8"
) as destination_file:
read = binary.read
write = destination_file.write
chunk_size = 1024 * 64
Expand Down

0 comments on commit 9023859

Please sign in to comment.