title: Python how to save dictionary with cyrillic symbols into json file
body: <pre><code>#!/usr/bin/env python
  # -*- coding: utf-8 -*-
  import json
  
  
  d = {'a':'текст',
       'b':{
           'a':'текст2',
           'b':'текст3'
       }}
  print(d)
  
  w = open('log', 'w')
  json.dump(d,w, ensure_ascii=False)
  w.close()
  </code></pre>
  
  <p>It gives me:
  UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-5: ordinal not in range(128)</p>