We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ce4b88 commit dea8674Copy full SHA for dea8674
1 file changed
sciencemode/_cffi.py
@@ -1,8 +1,15 @@
1
# -*- coding: utf-8 -*-
2
3
import os
4
-import platform
5
import sys
+
6
+# Force UTF-8 encoding for all file operations - do this BEFORE any other imports
7
+if sys.platform.startswith("win"):
8
+ # On Windows, force UTF-8 encoding for all I/O operations
9
+ os.environ["PYTHONIOENCODING"] = "utf-8"
10
+ os.environ["PYTHONUTF8"] = "1"
11
12
+import platform
13
import re
14
import itertools
15
from cffi import FFI
0 commit comments