Hi,
You are right it is a bug. In kindleunpack.py, near the end of the file, you will see the following code block:
Code:
argv=utf8_argv()
progname = os.path.basename(argv[0])
try:
opts, args = getopt.getopt(sys.argv[1:], "hdrs")
except getopt.GetoptError, err:
print str(err)
usage(progname)
sys.exit(2)
if len(args)<1:
usage(progname)
sys.exit(2)
for o, a in opts:
if o == "-d":
DUMP = True
if o == "-r":
WRITE_RAW_DATA = True
if o == "-s":
SPLIT_COMBO_MOBIS = True
if o == "-h":
usage(progname)
sys.exit(0)
if len(args) > 1:
infile, outdir = args
else:
infile = args[0]
Please change this line:
Code:
opts, args = getopt.getopt(sys.argv[1:], "hdrs")
To look like this and see if that fixes your issue?
Code:
opts, args = getopt.getopt(argv[1:], "hdrs")
So that it will get the utf-8 encoded command line and not the python broken internal sys.argv command line.
Hope this fixes the issue!
Thanks,
KevinH