Provided Python 3.x compatibility. Caveat: two Japanese test cases fail.