2

I'm writing a code that lists all the the files within a specific directory. I'm using the os module and the command:

os.listdir(path)

However, if a file is in my native language, Hebrew, it prints gibberish.

������ 1.docx

If I print the whole list the item shows in the list as:

\xe0\xf1\xee\xe1\xec\xf8 1.docx

Is there a way to make it print in my language and not gibberish?

snakecharmerb
  • 36,887
  • 10
  • 71
  • 115
Ofir
  • 45
  • 1
  • 7

0 Answers0