title: UnicodeEncodeError: 'charmap' codec can't encode character '\u20b9' in position 5: character maps to <undefined>
body: <p>Here is my code, I am scraping the data of 99acres website and storing it in a csv file but when i am doing so it gives me a error message of 'charmap' codec can't encode character '\u20b9'...Please Tell me how it will be resolved...</p>
  
  <pre><code>import io
  import csv
  import requests
  from bs4 import BeautifulSoup
  
  response = requests.get('https://www.99acres.com/search/property/buy/residential-all/hyderabad?search_type=QS&amp;search_location=HP&amp;lstAcn=HP_R&amp;lstAcnId=0&amp;src=CLUSTER&amp;preference=S&amp;selected_tab=1&amp;city=269&amp;res_com=R&amp;property_type=R&amp;isvoicesearch=N&amp;keyword_suggest=hyderabad%3B&amp;fullSelectedSuggestions=hyderabad&amp;strEntityMap=W3sidHlwZSI6ImNpdHkifSx7IjEiOlsiaHlkZXJhYmFkIiwiQ0lUWV8yNjksIFBSRUZFUkVOQ0VfUywgUkVTQ09NX1IiXX1d&amp;texttypedtillsuggestion=hyder&amp;refine_results=Y&amp;Refine_Localities=Refine%20Localities&amp;action=%2Fdo%2Fquicksearch%2Fsearch&amp;suggestion=CITY_269%2C%20PREFERENCE_S%2C%20RESCOM_R&amp;searchform=1&amp;price_min=null&amp;price_max=null')
  
  html = response.text
  
  soup = BeautifulSoup(html, 'html.parser')
  
  list=[]
  
  dealer = soup.findAll('div',{'class': 'srpWrap'})
  
  
  for item in dealer:
      try:
          p = item.contents[1].find_all("div",{"class":"_srpttl srpttl fwn wdthFix480 lf"})[0].text
      except:
          p=''
      try:
            d = item.contents[1].find_all("div",{"class":"lf f13 hm10 mb5"})[0].text
      except:
            d=''
      li=[p,d]
      list.append(li)
  
  with io.open('project.csv','w',encoding="utf-8") as file:
      writer= csv.writer(file)
      for row in list:
          writer.writerows(row)
  file.close()
  </code></pre>