Implement nqp::setencoding
some fixes to setencoding
Merge pull request #17 from zhuomingliang/patch-3

Implement nqp::setencoding