Exemplo n.º 1
0
/**
 * xoops_utf8_encode()
 *
 * @param mixed $text
 * @return
 */
function xoops_utf8_encode(&$text)
{
    xoops_load('XoopsLocal');
    return XoopsLocal::utf8_encode($text);
}
Exemplo n.º 2
0
function &xoops_utf8_encode(&$text)
{
    if (is_callable(array("XoopsLocal", "utf8_encode"))) {
        return XoopsLocal::utf8_encode($text);
    }
    if (XOOPS_USE_MULTIBYTES == 1) {
        if (function_exists('mb_convert_encoding')) {
            return mb_convert_encoding($text, 'UTF-8', 'auto');
        }
        return $text;
    }
    return utf8_encode($text);
}