title: How can I convert the ANSI format csv to UTF-8 using python?
body: <p>I have a code for writing the Values in CSV using python code.
  It is getting stored in ANSI format. but I need in a UTF-8 format for my reading operations.</p>
  
  <p>Python code:</p>
  
  <pre><code>  f= csv.writer(open("test1234.csv", "w+",encoding='utf- 
                  8'),lineterminator="\n")
   fieldname = ['Param_Name','Param_Value']
   f.writerow(fieldname)
   instances = conn.instances.filter(Filters=[{'Name': 'instance-state-name', 
   'Values': ['running', 'stopped']}])
   for instance in instances:
      instance_count.append(instance)
      instanceCount = str(len(instance_count))
   f.writerow(('p_instance_count', len(instance_count)))
   print('Instance count -&gt;' + str(len(instance_count)))
  </code></pre>
  
  <p>error:</p>
  
  <pre><code> f = csv.writer(open("test1234.csv", "w+",encoding='utf-8'), lineterminator="\n")
  </code></pre>
  
  <p>TypeError: 'encoding' is an invalid keyword argument for this function</p>
  
  <p>Please suggest any workaround!</p>