If the result is of type unicode, render method encodes it in utf-8. We need to decode it in that case so that the rendering results correct.