Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmdstanpy/utils/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import subprocess
import sys
import locale
from typing import Callable, List, Optional, TextIO

from .filesystem import pushd
Expand Down Expand Up @@ -47,6 +48,7 @@ def do_command(
stderr=subprocess.STDOUT, # avoid buffer overflow
env=os.environ,
universal_newlines=True,
encoding=locale.getdefaultlocale()[1],
Copy link
Member

Choose a reason for hiding this comment

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

It's too bad encoding='locale' and locale.getencoding() are only available on newer versions. I think locale.getpreferredencoding(False) is the best option for older versions

)
while proc.poll() is None:
if proc.stdout is not None:
Expand Down
Loading