Fixed a typo with encoding parsing

Seems like a typo with encoding parsing. Fixed.
Same typo in PBC client as well
Merge pull request #196 from shuhaowu/encoding-typo

Fixed a typo with encoding parsing