Debugger: Fix encoding switch  between Python 2 and Python 3

Change-Id: I29260139fa82f63c3e278913c5e3aa9f658d15d6
Reviewed-by: Christian Stenger <christian.stenger@digia.com>