Ask Your Question
0

unicode in sage terminal

asked 11 years ago

Moataz Elmasry gravatar image

updated 11 years ago

fidbc gravatar image

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 and patch 1176c4b 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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
2

answered 11 years ago

fidbc gravatar image

updated 11 years ago

kcrisman gravatar image

Here is a related question in stackoverflow.

This seems to work for me

sage: print u"ä".encode('utf-8')
ä
Preview: (hide)
link

Comments

1

[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.

kcrisman gravatar imagekcrisman ( 11 years ago )

thnx it works great!!

Moataz Elmasry gravatar imageMoataz Elmasry ( 11 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 11 years ago

Seen: 1,897 times

Last updated: Apr 26 '13