Use shape encoding to transcode field names. Python test and shape.

This fixes issue #700