I have a text file which contains some Persian text, I want to read the file and calculate the number of occurrence of each word then print the calculated values. this is my code:

```
f = open('C:/python programs/hafez.txt')
wordDict ={}
for line in f:
    wordList = line.strip().split(' ')
    for word in wordList:
        if word not in wordDict:  
            wordDict[word] = 1
        else: wordDict[word] = wordDict[word]+1

print((str(wordDict)))

```

It produces results which has wrong coding format, I tried various ways to fix this but no good result! Here is part of the text that this code produces:

> 
> {"\x00'\x063\x06(\x06": 3, "\x00,\x06'\x06E\x06G\x06": 16, "\x00'\x063\x06\*\x06E\x06'\x069\x06": 1, '\x00-\x064\x061\x06': 1, .....} 
> 
> 
>