Handle case where encoding is not set
Merge pull request #229 from hashdist/ahmadia/fix_encoding_2

Handle case where encoding is not set