Skip to content

Commit 8b18211

Browse files
committed
fix(logger): set utf-8 encoding
1 parent f516594 commit 8b18211

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/firebase_functions/logger.py

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
import typing as _typing
99
import typing_extensions as _typing_extensions
1010

11+
# If encoding is not 'utf-8', change it to 'utf-8'.
12+
if _sys.stdout.encoding != "utf-8":
13+
_sys.stdout.reconfigure(encoding="utf-8")
14+
if _sys.stderr.encoding != "utf-8":
15+
_sys.stderr.reconfigure(encoding="utf-8")
1116

1217
class LogSeverity(str, _enum.Enum):
1318
"""

0 commit comments

Comments
 (0)