Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions agent-notes/improve-utf8-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Goal

Write application log files as UTF-8 on every supported platform.

# State

File handlers explicitly request UTF-8. Console handlers and file write mode are unchanged. The existing package/configuration CI runs on this PR; it does not run application logging scenarios.

# Decisions and why

QRead, QFeed and QCast log externally supplied titles. Their content must not depend on the Windows locale's default encoding. Use FileHandler's existing encoding argument, available on the consumers' Python 3.8 baseline.

# Surprises

The existing helper's filename branch is the only file-handler construction site.

# Next step

Read the published PR's checks. Merge and release are outside this task.
2 changes: 1 addition & 1 deletion logger_setup/logger_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def create_handler(
if filename is None:
handler = handler_class()
else:
handler = handler_class(filename, mode=handler_mode)
handler = handler_class(filename, mode=handler_mode, encoding="utf-8")
handler.setLevel(level)
handler.setFormatter(formatter)
logger.addHandler(handler)
Expand Down
Loading