#8128: UnicodeDecodeError with %latex
----------------------------+-----------------------------------------------
Reporter: mpatel | Owner: was
Type: defect | Status: needs_review
Priority: minor | Milestone: sage-4.3.2
Component: notebook | Keywords:
Author: Mitesh Patel | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
Comment(by mpatel):
From `sagenb.misc.misc`:
{{{
#!python
def encoded_str(obj, encoding='utf-8'):
if isinstance(obj, unicode):
return obj.encode(encoding, 'ignore')
return str(obj)
def unicode_str(obj, encoding='utf-8'):
if isinstance(obj, str):
return obj.decode(encoding, 'ignore')
elif isinstance(obj, unicode):
return obj
return unicode(obj)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8128#comment:2>
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.