For parity with pgsp_store(), convert encoding
Merge pull request #31 from petergeoghegan/encoding_conversion

For parity with pgsp_store(), convert encoding