Skip to content

fix: unicode log normalization - #492

Merged
manuelporrasojeda merged 3 commits into
masterfrom
fix/unicode-log-normalization
Nov 30, 2026
Merged

manuelporrasojeda merged 3 commits into
masterfrom
fix/unicode-log-normalization

Conversation

@manuelporrasojeda

Copy link
Copy Markdown
Contributor

Written for: PR reviewers.

Unicode Log Normalization

This change ensures that Unicode escape sequences are decoded before they are written to log files.

Implementation

  • Added a shared UnicodeEscapeFormatter for standard Python log records.
  • The formatter converts literal escape sequences such as:
    • \u00f1 → ñ
    • \u20ac → €
    • \U0001F680 → 🚀
  • Added a shared decoding helper that preserves unrelated backslashes.
  • Updated the standard Toolium logging configurations to use the formatter.
  • Kept the same normalization for WebDriver logs, which are written directly to files and bypass the standard logging handlers.
  • Configured log files to use UTF-8 encoding explicitly.
  • Added regression coverage for Unicode characters and escaped Unicode sequences.

Checklist

  • The title of this pull request follows the convention above
  • docs/ is updated if the change is user-visible

@manuelporrasojeda
manuelporrasojeda requested a review from a team as a code owner November 27, 2026 14:42
Comment thread toolium/utils/logging_utils.py Resolved
Comment thread toolium/test/conf/logging.conf Resolved

@Rcatala18 Rcatala18 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@manuelporrasojeda
manuelporrasojeda merged commit 6278c06 into master Nov 30, 2026
24 checks passed
@manuelporrasojeda
manuelporrasojeda deleted the fix/unicode-log-normalization branch November 30, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants