Handle UTF-8 keys in jsonrpc.py