JSON is always UTF-8 (Bug #8685).
authorJan Schneider <jan@horde.org>
Sat, 7 Nov 2009 12:57:38 +0000 (13:57 +0100)
committerJan Schneider <jan@horde.org>
Sat, 7 Nov 2009 17:47:27 +0000 (18:47 +0100)
framework/Rpc/lib/Horde/Rpc/Jsonrpc.php

index e1f5005..48f5716 100644 (file)
 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.