title: extracting persian/farsi text from image in python
body: <p>i have a problem with extracting persian text from image in python.
  this is my code</p>
  <pre><code>import cv2
  import pytesseract
  
  pytesseract.pytesseract.tesseract_cmd = r'C:\\Program Files\\Tesseract-OCR\\tesseract.exe'
  img = cv2.imread('kkk.jpg')
  text = pytesseract.image_to_string(img)
  read = text.encode('utf-8')
  print(read)
  </code></pre>
  <p>and the output...</p>
  <pre><code>b'ae Ose\nDs EO gr ga HHO seme Oe TY ID OAM mE GRA CC 0\noP st joa nt RE pene op A er pr ee &lt;2\nSr Bho OF 0 6M er erg AE Ce AD or70 e100 ETT NAO =P 16\ney AO ER EO a ome Shes 1g ee\nwido Aire 8 Ore sO er Cory |? re pre CO ee\nAD LH pre Dae heyy PACD He sy oy oe OO sie Aion\xe2\x80\x9d\nDB ep SD Sop 6 FD Hoy (CAD ASS ep gets (Se EO ET\nay gt OCs CO map) ramnee (FETE SIO wre a OTe IO\nry pO Se Forge ye ag PLEA HG gelg0 9 erie re OG\nCP nO ser Fine? LA Peter (9007 \xe2\x80\x98SHG \xc2\xa5 [BIS) SI SY\nifs pre A (JK So ey pe? g1005 [HO 2 IC QC\nqe ID Sr VET pra? Aire Marto ery mrewy rem geod \xc2\xa9\n\nseq, PF em ae'
  </code></pre>