##// END OF EJS Templates
Merge pull request #11711 from pierstitus/unicodeerror...
Matthias Bussonnier -
r25051:dd58c555 merge
parent child Browse files
Show More
@@ -187,7 +187,12 b' class DisplayHook(Configurable):'
187 187 # But avoid extraneous empty lines.
188 188 result_repr = '\n' + result_repr
189 189
190 print(result_repr)
190 try:
191 print(result_repr)
192 except UnicodeEncodeError:
193 # If a character is not supported by the terminal encoding replace
194 # it with its \u or \x representation
195 print(result_repr.encode(sys.stdout.encoding,'backslashreplace').decode(sys.stdout.encoding))
191 196
192 197 def update_user_ns(self, result):
193 198 """Update user_ns with various things like _, __, _1, etc."""
General Comments 0
You need to be logged in to leave comments. Login now