Check generated object strings have matching encoding.

PP is yet again return US-ASCII when it shouldn't. Fixes #324