Fix encoding in put(dchar)
Merge pull request #733 from sinkuu/fix_encode

Fix encoding in put(dchar)