ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 28 Apr 2013 03:30:07 -0500unicode in sage terminalhttps://ask.sagemath.org/question/10066/unicode-in-sage-terminal/Hello
when I type
sage: "ä"
'\xc3\xa4' #latin1
sage: u"ä"
u'\xe4' #utf-8
I was actually hoping to display the actual character ä.
I'm aware of issues [#13296](http://trac.sagemath.org/sage_trac/ticket/13296) and [patch 1176c4b](https://github.com/sagemath/sagecell/commit/1176c4b210d83715ac26a67014d926aa9cfcd179)
I have sage 5.8 installed through ubuntu 12.04 repository
Still though I can't seem to print a german umlaut 'ä' neither in a sage terminal nor in a notebook
Anyone has the same problem in sage 5.8?Fri, 26 Apr 2013 05:02:58 -0500https://ask.sagemath.org/question/10066/unicode-in-sage-terminal/Answer by fidbc for <p>Hello</p>
<p>when I type</p>
<pre><code>sage: "ä"
'\xc3\xa4' #latin1
sage: u"ä"
u'\xe4' #utf-8
</code></pre>
<p>I was actually hoping to display the actual character ä.
I'm aware of issues <a href="http://trac.sagemath.org/sage_trac/ticket/13296">#13296</a> and <a href="https://github.com/sagemath/sagecell/commit/1176c4b210d83715ac26a67014d926aa9cfcd179">patch 1176c4b</a>
I have sage 5.8 installed through ubuntu 12.04 repository
Still though I can't seem to print a german umlaut 'ä' neither in a sage terminal nor in a notebook</p>
<p>Anyone has the same problem in sage 5.8?</p>
https://ask.sagemath.org/question/10066/unicode-in-sage-terminal/?answer=14847#post-id-14847[Here](http://stackoverflow.com/questions/3101100/python-trouble-printing-short-utf-encoded-strings) is a related question in stackoverflow.
This seems to work for me
sage: print u"ä".encode('utf-8')
ä
Fri, 26 Apr 2013 06:19:44 -0500https://ask.sagemath.org/question/10066/unicode-in-sage-terminal/?answer=14847#post-id-14847Comment by kcrisman for <p><a href="http://stackoverflow.com/questions/3101100/python-trouble-printing-short-utf-encoded-strings">Here</a> is a related question in stackoverflow.</p>
<p>This seems to work for me</p>
<pre><code>sage: print u"ä".encode('utf-8')
ä
</code></pre>
https://ask.sagemath.org/question/10066/unicode-in-sage-terminal/?comment=17802#post-id-17802[This SO question](http://stackoverflow.com/questions/2260815/weird-problem-with-input-encoding-in-ipython) specifically addresses the Ipython issue - or, rather, that Ipython has issues.Fri, 26 Apr 2013 06:53:57 -0500https://ask.sagemath.org/question/10066/unicode-in-sage-terminal/?comment=17802#post-id-17802Comment by Moataz Elmasry for <p><a href="http://stackoverflow.com/questions/3101100/python-trouble-printing-short-utf-encoded-strings">Here</a> is a related question in stackoverflow.</p>
<p>This seems to work for me</p>
<pre><code>sage: print u"ä".encode('utf-8')
ä
</code></pre>
https://ask.sagemath.org/question/10066/unicode-in-sage-terminal/?comment=17794#post-id-17794thnx it works great!!Sun, 28 Apr 2013 03:30:07 -0500https://ask.sagemath.org/question/10066/unicode-in-sage-terminal/?comment=17794#post-id-17794