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
  • 47,570
  • 11
  • 100
  • 153
Ofir
  • 47
  • 1
  • 7

0 Answers0