unicode path tolarence and test

This commit is contained in:
anon 2023-11-28 13:55:07 +01:00
parent 7af87ecbcd
commit 393ce88bec
2 changed files with 2 additions and 1 deletions
debug/űnicode
hitags.py

1
debug/űnicode/c.c Normal file

@ -0,0 +1 @@
int i = 0;

@ -96,7 +96,7 @@ def mimetype(filename):
# cmd = "file -i {input_}".format(input_=filename)
cmd = "mimetype {input_}".format(input_=filename)
r = run(cmd, shell=True, stdout=PIPE)
r = r.stdout.decode('ascii').split(' ')[1].strip()
r = r.stdout.decode('ascii', errors='replace').split(' ')[1].strip()
return r
def preprocessfile(filename):