From 6cee607d7cc01354341d2a1ddfb3ea6dd26bb7c0 Mon Sep 17 00:00:00 2001 From: Emery Berger Date: Thu, 17 Oct 2024 12:56:31 -0400 Subject: [PATCH] Fixes https://github.com/plasma-umass/scalene/issues/869 --- src/include/traceconfig.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/traceconfig.hpp b/src/include/traceconfig.hpp index 5310bb8a6..2ba1e9294 100644 --- a/src/include/traceconfig.hpp +++ b/src/include/traceconfig.hpp @@ -27,7 +27,7 @@ class TraceConfig { auto s = PyBytes_AsString(unic); items.push_back(s); } - scalene_base_path = PyBytes_AsString(PyUnicode_AsASCIIString(base_path)); + scalene_base_path = PyBytes_AsString(PyUnicode_AsEncodedString(base_path, "utf-8", "strict")); } bool should_trace(char* filename) {