convert character code to utf-8 before send string to brower