nschloe/matplotlib2tikz — Issue #10: Can't encode u'u\2212'
Author: paulomarcondes
Created: 2011-12-26 01:00:40+00:00
State: open

when using ipython 0.11 on Python 2.7.2 from debian sid, this simple script
```python
from matplotlib2tikz import save as tikz_save
x=linspace(-2,2,100)
plot(x,x**4+x**3+x**2+x)
tikz_save('teste1.tex')
```
fails with error:

UnicodeEncodeError Traceback (most recent call last)
/home/pmarc/Dropbox/mestrado/script/ in ()
----> 1 tikz_save('teste1.tex')

/usr/local/lib/python2.7/dist-packages/matplotlib2tikz.pyc in save(filepath, figurewidth, figureheight, textsize, tex_relative_path_to_data, strict, draw_rectangles, wrap, extra)
146 file_handle.write( "\n\n" )
147
--> 148 file_handle.write( ''.join(content) )
149 if wrap:
150 file_handle.write( "\\end{tikzpicture}" )

UnicodeEncodeError: 'ascii' codec can't encode character u'\u2212' in position 232: ordinal not in range(128)

The LaTeX system is the full instalation of TeXlive. (package texlive-full)