title: json.dumps and UnicodeDecodeError
body: <p>I am trying to make the "converter" script in <a href="https://github.com/bjornd/jvectormap/" rel="nofollow">jvectormap</a> into work but I am getting the following error,</p>
  
  <pre><code>ultural$ python ../../../../jvectormap/converter/converter.py --width 1000 --country_name_index 1 --country_code_index 30 --where "'ISO = DEU'" --projection aea --name datag_germany --language en_US ne_10m_admin_1_states_provinces_shp.shp here.js
  ERROR 1: Not enough tokens to complete expression.
  Traceback (most recent call last):
    File "../../../../jvectormap/converter/converter.py", line 294, in &lt;module&gt;
      converter.convert(args['output_file'])
    File "../../../../jvectormap/converter/converter.py", line 182, in convert
      open(outputFile, 'w').write( self.map.getJSCode() )
    File "../../../../jvectormap/converter/converter.py", line 30, in getJSCode
      return "jQuery.fn.vectorMap('addMap', '"+self.name+"_"+self.projection['type']+"_"+self.language+"',"+json.dumps(map)+');'
    File "/usr/lib/python2.6/json/__init__.py", line 230, in dumps
      return _default_encoder.encode(obj)
    File "/usr/lib/python2.6/json/encoder.py", line 367, in encode
      chunks = list(self.iterencode(o))
    File "/usr/lib/python2.6/json/encoder.py", line 309, in _iterencode
      for chunk in self._iterencode_dict(o, markers):
    File "/usr/lib/python2.6/json/encoder.py", line 275, in _iterencode_dict
      for chunk in self._iterencode(value, markers):
    File "/usr/lib/python2.6/json/encoder.py", line 309, in _iterencode
      for chunk in self._iterencode_dict(o, markers):
    File "/usr/lib/python2.6/json/encoder.py", line 273, in _iterencode_dict
      yield encoder(key)
  UnicodeDecodeError: 'utf8' codec can't decode byte 0xe1 in position 4: unexpected end of data
  </code></pre>
  
  <p>I was wondering, how should I deal with json.dumps and the encoding - which seems is the major issue in this case. I am using python 2.6;</p>