Updated to support non-ascii strings and respect their encoding
Merge pull request #1 from patrickod/master

Updated to support non-ascii strings and respect their encoding