Several hours ago I post my question about unicode support in "axes_labels",here is my question
I am sure this is really a bug of sage,I don't know how to report this bug as the spreadsheets.google.com is block by Chinese government.
As we know that Matplotlib supports unicode with some setting in "matplotlibrc",and I make it work with Chinese characters now.But when I want to set the axes labels to some Chinese characters with "axes_labels" attribute ,I got exception:"UnicodeEncodeError: 'ascii' codec can't encode character u'\u6211' in position 0: ordinal not in range(128)"
After I changed some code in sage/local/lib/python/site.py,I set the default encoding to "utf-8",that exception never raise again.But the problem does not be solved as the Chinese characters shown in the axes labels all become boxs like [].
Why I can set the axes labels in Chinese with matplotlib but can not in sage? After I check the source code in
SAGE/local/lib/python2.7/site-packages/sage/plot/graphics.py
In line 634 of the method "def axes_labels(self, l=None)",I found the line is
self.__axes_labels = (str(l[0]), str(l[1]))
It is obviously that the problem is caused by the str(),after change this line to
self.__axes_labels = (l[0], l[1])
and remove the SAGE/local/lib/python2.7/site-packages/sage/plot/graphics.pyc,restart sage , I finally got this problem solved.Now Sage gets no problem to work with Chinese,or in other word,gets no problem to work with unicode(utf-8).
Sorry for my poor English , and wish to be understood.