Prompt user for string if can_encode.py is invoked without an argument

This allows usage on Windows, which by default does not support unicode
fully in the command line.
This commit is contained in:
Juhani Krekelä 2022-12-30 17:39:20 +01:00
parent d47c10eee3
commit 0e10b7cfad
1 changed files with 4 additions and 1 deletions

View File

@ -2,7 +2,10 @@ import sys
import char_encodings
decoded = sys.argv[1]
if len(sys.argv) == 2:
decoded = sys.argv[1]
else:
decoded = input()
singlebyte = {}
multibyte = {}