fix finput encoding problem on Windows

This commit is contained in:
scito committed 2022-12-31 21:27:40 +01:00
1 parent 739ae4c012
commit 5be6e9c322
3 files changed
+6 -4

No files matched your search

+1 -1
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):