[modulehandler] encode the response text from unicode to utf-8 before sending it out