Fix unicode rendering in json. Correct size of response is now set

Previously, the number of *characters* in the string was used for Content-Length.

Now, the number of *bytes* in the string is used for Content-Length.