From 89eb94705647e4d6932830249ab0e0c58552dfe0 Mon Sep 17 00:00:00 2001 From: Rune Hammersland <273190+yaunj@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:05:12 +0100 Subject: [PATCH] fix: enforce utf-8 encoding for files --- braintrust_migrate/orchestration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/braintrust_migrate/orchestration.py b/braintrust_migrate/orchestration.py index 83b6d17..e8a31e9 100644 --- a/braintrust_migrate/orchestration.py +++ b/braintrust_migrate/orchestration.py @@ -1017,7 +1017,7 @@ def _generate_migration_report( detailed_report["projects"][project_name] = project_summary # Write JSON report to file - with open(report_path, "w") as f: + with open(report_path, "w", encoding="utf-8") as f: json.dump(detailed_report, f, indent=2, default=str) # Also create a human-readable summary @@ -1044,7 +1044,7 @@ def _write_human_readable_summary( detailed_report: The detailed report data. summary_path: Path to write the summary. """ - with open(summary_path, "w") as f: + with open(summary_path, "w", encoding="utf-8") as f: f.write("# Braintrust Migration Summary\n") f.write("=" * 50 + "\n\n")