Smaller fixes to testcase
Fix regex for determining charset in traceback

Fix #547
Merge branch '0.9-maintenance'

Conflicts:
	tests/test_debug.py