#13296: matplotlib do not handle unicode properly from command line
---------------------------------------+------------------------------------
Reporter: slabbe | Owner: jason, was
Type: defect | Status: new
Priority: major | Milestone: sage-5.3
Component: graphics | Resolution:
Keywords: unicode, matplotlib | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: #13161 | Stopgaps:
---------------------------------------+------------------------------------
Description changed by slabbe:
Old description:
> Using sage-5.2.rc0, unicode letter é gets replaced by "é" in matplotlib
> plot:
>
> {{{
> sage: text(u'an accent : é', (1,1), color='red')
> }}}
>
> With #13161 the same problem appears for axes labels :
>
> {{{
> sage: t = text(u'an accent : é', (1,1), color='red')
> sage: t.axes_labels([u'an accent : é', 'Y']) # broken without
> #13161
> sage: t
> }}}
>
> But, as mentionned in ticket #13161, if the same code is written in a
> file without encoding, then unicode gets printed perfectly :
>
> {{{
> # this is file.sage
> t = text(u'an accent : é', (1,1), color='red')
> t.axes_labels([u'an accent : é', 'Y']) # broken without #13161
> }}}
>
> Is perfect :
>
> {{{
> sage: attach file.sage
> sage: t
> }}}
>
> What is the difference between a file and the command line?
New description:
Using sage-5.2.rc0, unicode letter é gets replaced by "é" in matplotlib
plot:
{{{
sage: text(u'an accent : é', (1,1), color='red')
}}}
With #13161 the same problem appears for axes labels :
{{{
sage: t = text(u'an accent : é', (1,1), color='red')
sage: t.axes_labels([u'an accent : é', 'Y']) # broken without #13161
sage: t
}}}
But, as mentionned in ticket #13161, if the same code is written in a file
without encoding, then unicode gets printed perfectly :
{{{
# this is file.sage
t = text(u'an accent : é', (1,1), color='red')
t.axes_labels([u'an accent : é', 'Y']) # broken without #13161
}}}
Is perfect :
{{{
sage: attach file.sage
sage: t
}}}
What makes it work in a file but not for the command line?
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13296#comment:1>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.