From 45e160567cb2faffc26aa0f3125492d47e94b980 Mon Sep 17 00:00:00 2001 From: Mark Florisson Date: Thu, 2 Dec 2010 21:57:02 +0100 Subject: [PATCH] "Fix" printing of gdb.Values with non-ascii characters or unicode ordinals --- Cython/Debugger/libpython.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Cython/Debugger/libpython.py b/Cython/Debugger/libpython.py index 38bc7b81775..07a57a49c0f 100644 --- a/Cython/Debugger/libpython.py +++ b/Cython/Debugger/libpython.py @@ -59,6 +59,10 @@ 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*