diff --git a/share/qtcreator/gdbmacros/dumper.py b/share/qtcreator/gdbmacros/dumper.py
index 3db8be0a5d5a35056d914b23d513b0b9c9db1022..3cc9d26b9fc75adba1dda73eee2d0e980f92c909 100644
--- a/share/qtcreator/gdbmacros/dumper.py
+++ b/share/qtcreator/gdbmacros/dumper.py
@@ -10,8 +10,15 @@ import base64
 import os
 import __builtin__
 
-if os.name != "nt":
+if os.name == "nt":
+    def printableChar(ucs):
+        if ucs >= 32 and ucs <= 126:
+            return ucs
+        return '?'
+else:
     import curses.ascii
+    def printableChar(ucs):
+        return select(curses.ascii.isprint(ucs), ucs, '?')
 
 # only needed for gdb 7.0/7.0.1 that do not implement parse_and_eval
 import os
diff --git a/share/qtcreator/gdbmacros/gdbmacros.py b/share/qtcreator/gdbmacros/gdbmacros.py
index 93e4a4ad633ceea2760a3c8dcd0b14a5d9f57530..35e94a0946ab9a44813d85d62f482610d9b8b4bd 100644
--- a/share/qtcreator/gdbmacros/gdbmacros.py
+++ b/share/qtcreator/gdbmacros/gdbmacros.py
@@ -37,8 +37,7 @@ def qdump__QByteArray(d, item):
 
 def qdump__QChar(d, item):
     ucs = int(item.value["ucs"])
-    c = select(curses.ascii.isprint(ucs), ucs, '?')
-    d.putValue("'%c' (%d)" % (c, ucs))
+    d.putValue("'%c' (%d)" % (printableChar(ucs), ucs))
     d.putNumChild(0)
 
 
diff --git a/tests/manual/gdbdebugger/simple/app.cpp b/tests/manual/gdbdebugger/simple/app.cpp
index a70459d11a763d70b31747892f667924e6566bb3..316ed1ce78ae88d08bdad30612c2c647922733ee 100644
--- a/tests/manual/gdbdebugger/simple/app.cpp
+++ b/tests/manual/gdbdebugger/simple/app.cpp
@@ -428,7 +428,7 @@ void testQList()
     flist.push_back(1000);
     flist.push_back(1001);
     flist.push_back(1002);
-#if 0
+#if 1
     QList<int> li;
     QList<uint> lu;