updated encoding and packing of data
Merge pull request #1 from dogfood20/fix_for_unicode

updated encoding and packing of data