Skip to content

Commit

Permalink
Merge pull request #47 from EmmanuelCharpentier/master
Browse files Browse the repository at this point in the history
Return a (correct) UTF-8 string to IPython...
  • Loading branch information
fchapoton authored Nov 3, 2019
2 parents 5178ddb + d83f09b commit 1549f72
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions emacs_sage_shell_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ def displayhook(self, plain_text, rich_output):
return ({u'text/plain': msg}, {})

elif isinstance(rich_output, OutputLatex):
text = "BEGIN_TEXT:" + plain_text.text.get() + ":END_TEXTBEGIN_LATEX:" + \
rich_output.latex.get() + ":END_LATEX"
return ({u'text/plain': text}, {})
text = "BEGIN_TEXT:" + str(plain_text.text.get(), 'utf-8') + ":END_TEXTBEGIN_LATEX:" + \
str(rich_output.latex.get(), 'utf-8') + ":END_LATEX"
return ({'text/plain': text}, {})
else:
return super(BackendEmacs, self).displayhook(plain_text, rich_output)

Expand Down

0 comments on commit 1549f72

Please sign in to comment.