include_libs('xmlrpcs.inc.php',false,false);
/* define xmlrpc settings */
-$xmlrpc_internalencoding = _CHARSET;
+//$xmlrpc_internalencoding = _CHARSET;
+$xmlrpc_internalencoding = 'UTF-8';
$xmlrpc_defencoding = 'UTF-8';
/* definition of available methods */
if ($closed != 1)
$closed = 0;
+ if (strtolower(_CHARSET) != 'utf-8') {
+ $title = mb_convert_encoding($title, _CHARSET, "UTF-8");\r
+ $body = mb_convert_encoding($body, _CHARSET, "UTF-8");\r
+ $more = mb_convert_encoding($more, _CHARSET, "UTF-8");\r
+ }
+
// 4. add to blog
$itemid = $blog->additem($catid, $title, $body, $more, $blogid, $mem->getID(), $timestamp, $closed, $draft);
if (!$mem->canAlterItem($itemid))
return _error(7,"Not allowed to alter item");
+ if (strtolower(_CHARSET) != 'utf-8') {
+ $title = mb_convert_encoding($title, _CHARSET, _CHARSET.",UTF-8");\r
+ $body = mb_convert_encoding($body, _CHARSET, _CHARSET.",UTF-8");\r
+ $more = mb_convert_encoding($more, _CHARSET, _CHARSET.",UTF-8");\r
+ }
+
// 3. update item
ITEM::update($itemid, $catid, $title, $body, $more, $closed, $wasdraft, $publish, 0);