fix finput encoding problem on Windows

This commit is contained in:
scito
2022-12-31 21:24:01 +01:00
parent 739ae4c012
commit 5be6e9c322
3 changed files with 6 additions and 4 deletions

View File

@@ -335,7 +335,7 @@ def get_otp_urls_from_file(filename: str, args: Args) -> OtpUrls:
def read_lines_from_text_file(filename: str) -> list[str]:
if verbose: print(f"Reading lines of {filename}")
finput = fileinput.input(filename)
finput = fileinput.input(filename, encoding='utf-8')
try:
lines = []
for line in (line.strip() for line in finput):