We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11e6163 commit 5d1844aCopy full SHA for 5d1844a
commitizen/cmd.py
@@ -1,6 +1,8 @@
1
import subprocess
2
from typing import NamedTuple
3
4
+import chardet
5
+
6
7
class Command(NamedTuple):
8
out: str
@@ -21,8 +23,8 @@ def run(cmd: str) -> Command:
21
23
stdout, stderr = process.communicate()
22
24
return_code = process.returncode
25
return Command(
- stdout.decode("iso-8859-1"),
- stderr.decode("iso-8859-1"),
26
+ stdout.decode(chardet.detect(stdout)["encoding"]),
27
+ stderr.decode(chardet.detect(stderr)["encoding"]),
28
stdout,
29
stderr,
30
return_code,
pyproject.toml
@@ -56,6 +56,7 @@ jinja2 = ">=2.10.3"
56
pyyaml = ">=3.08"
57
argcomplete = "^1.12.1"
58
typing-extensions = "^4.0.1"
59
+chardet = "^5.0.0"
60
61
[tool.poetry.dev-dependencies]
62
ipython = "^7.2"
0 commit comments