Skip to content

Commit 1988e9d

Browse files
committed
Fix for file encoding on windows
1 parent 4b41da5 commit 1988e9d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

buzz/widgets/recording_transcriber_widget.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ def write_to_export_file(file_path: str, content: str, mode: str = "a", retries:
674674
"""Write to an export file with retry logic for Windows file locking."""
675675
for attempt in range(retries):
676676
try:
677-
with open(file_path, mode) as f:
677+
with open(file_path, mode, encoding='utf-8') as f:
678678
f.write(content)
679679
return
680680
except PermissionError:
@@ -691,7 +691,7 @@ def read_export_file(file_path: str, retries: int = 5, delay: float = 0.2) -> st
691691
"""Read an export file with retry logic for Windows file locking."""
692692
for attempt in range(retries):
693693
try:
694-
with open(file_path, "r") as f:
694+
with open(file_path, "r", encoding='utf-8') as f:
695695
return f.read()
696696
except PermissionError:
697697
if attempt < retries - 1:

0 commit comments

Comments
 (0)