Per bug #1021052, pychecker has problems with unicode
identifiers. I believe most or all of these problems
are due to using str() on unicode data. Following the
lead of some existing code in CodeChecks.py, I have
created a function utils.safestr(), and converted all
occurrences of str() to use utils.safestr() instead.
Having done this, all of the existing regression tests
pass, and the test case for bug #1021052 also passes.