I just want to point out this is one of those places where using Python 2.6 to explicitly mark bytestrings (b'foo' syntax) might come in very handy in locating the potential pain point.