From bff9b6b204d6dac17d167c8aae9a64791c5535fd Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Sat, 7 Nov 2009 13:57:38 +0100 Subject: [PATCH] JSON is always UTF-8 (Bug #8685). --- framework/Rpc/lib/Horde/Rpc/Jsonrpc.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/framework/Rpc/lib/Horde/Rpc/Jsonrpc.php b/framework/Rpc/lib/Horde/Rpc/Jsonrpc.php index e1f5005e9..48f5716a9 100644 --- a/framework/Rpc/lib/Horde/Rpc/Jsonrpc.php +++ b/framework/Rpc/lib/Horde/Rpc/Jsonrpc.php @@ -28,6 +28,18 @@ class Horde_Rpc_Jsonrpc extends Horde_Rpc { /** + * Constructor. + * + * @param array $config A hash containing any additional configuration or + * connection parameters this class might need. + */ + function __construct($params = array()) + { + parent::__construct($params); + Horde_Nls::setCharsetEnvironment('UTF-8'); + } + + /** * Returns the Content-Type of the response. * * @return string The MIME Content-Type of the RPC response. -- 2.11.0