When no encoding was specified, raise exception if encoding/decoding required.

I believe this diverges from what was being discussed in the review
for pull request #96, but it meets my immediate needs.