From: Mark Florisson Date: Thu, 2 Dec 2010 20:57:02 +0000 (+0100) Subject: "Fix" printing of gdb.Values with non-ascii characters or unicode ordinals X-Git-Tag: 0.14.beta0~1^2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=45e160567cb2faffc26aa0f3125492d47e94b980;p=cython.git "Fix" printing of gdb.Values with non-ascii characters or unicode ordinals --- diff --git a/Cython/Debugger/libpython.py b/Cython/Debugger/libpython.py index 38bc7b81..07a57a49 100644 --- a/Cython/Debugger/libpython.py +++ b/Cython/Debugger/libpython.py @@ -59,6 +59,10 @@ import itertools import gdb +# I think this is the only way to fix this bug :'( +# http://sourceware.org/bugzilla/show_bug.cgi?id=12285 +reload(sys).setdefaultencoding('UTF-8') + # Look up the gdb.Type for some standard types: _type_char_ptr = gdb.lookup_type('char').pointer() # char* _type_unsigned_char_ptr = gdb.lookup_type('unsigned char').pointer() # unsigned char*