Lazza / RecuperaBit

A tool for forensic file system reconstruction.
GNU General Public License v3.0
517 stars 73 forks source link

Unicode in filenames makes the program crash #113

Open noiob opened 1 year ago

noiob commented 1 year ago
Traceback (most recent call last):
  File "main.py", line 374, in <module>
    main()
  File "main.py", line 371, in main
    interpret(cmd, arguments, parts, shorthands, args.outputdir)
  File "main.py", line 109, in interpret
    print(utils.tree_folder(part.lost))
  File "/usr/lib/pypy3/lib-python/3/encodings/ascii.py", line 22, in encode
    return codecs.ascii_encode(input, self.errors)[0]
UnicodeEncodeError: 'ascii' codec can't encode character '\xc4' in position 1175448: ordinal not in range(128)
> tikzplot 1
Rebuilding partition...
Done
Traceback (most recent call last):
  File "main.py", line 374, in <module>
    main()
  File "main.py", line 371, in main
    interpret(cmd, arguments, parts, shorthands, args.outputdir)
  File "main.py", line 161, in interpret
    print(utils.tikz_part(part))
  File "/usr/lib/pypy3/lib-python/3/encodings/ascii.py", line 22, in encode
    return codecs.ascii_encode(input, self.errors)[0]
UnicodeEncodeError: 'ascii' codec can't encode character '\xc4' in position 1688693: ordinal not in range(128)
Lazza commented 1 year ago

Have you tried with the standard Python instead of Pypy3? Does the same error occur?

noiob commented 1 year ago

I haven't, it didn't occur to me at the time. I can see if I can create a minimal iso reproducing the error