mirror of https://github.com/Textualize/rich.git
force utf-8 encoding for python3.6
This commit is contained in:
parent
6a50f1a123
commit
fa63fb8d77
|
@ -5,11 +5,11 @@ def get_capture_text(*paths: str) -> str:
|
|||
with open(
|
||||
pathlib.Path(__file__).parent.joinpath("captures", *paths), mode="rb"
|
||||
) as file:
|
||||
return file.read().decode()
|
||||
return file.read().decode("utf-8")
|
||||
|
||||
|
||||
def set_capture_text(*paths: str, output: str) -> None:
|
||||
with open(
|
||||
pathlib.Path(__file__).parent.joinpath("captures", *paths), mode="wb"
|
||||
) as file:
|
||||
file.write(output.encode())
|
||||
file.write(output.encode("utf-8"))
|
||||
|
|
Loading…
Reference in New Issue