Fix encoding in put(dchar)