2010-12-03, 13:38
pilophae Wrote:I like solution #1 best, but what about sending the Content-Encoding in the HTTP response? That would keep the encoding information in the same channel as the data. It would make sense since JSON-RPC is a HTTP-based protocol.
That's not correct. JSON-RPC can be used over HTTP but it can also be used over TCP (and probably any other transport protocol). TCP does not support any metadata concerning "encoding". IMHO the best solution would be to transfer everything in both directions in UTF-8 / UTF-16.