lib/PHPRtfLite/Utf8.php
public static function getUnicodeEntities($text, $inCharset)
    {
        if ($inCharset != 'UTF-8') {
            if (extension_loaded('iconv')) {
                $text = iconv($inCharset, 'UTF-8//TRANSLIT', $text);
            }
            else {
                throw new PHPRtfLite_Exception('Iconv extension is not available! '
                                             . 'Activate this extension or use UTF-8 encoded texts!');
            }
        }
        $text = self::utf8ToUnicode($text);
        return self::unicodeToEntitiesPreservingAscii($text);
    }
public static function getUnicodeEntities($text, $inCharset)
    {
        if ($inCharset != 'UTF-8') {
            if (extension_loaded('iconv')) {
                $text = iconv($inCharset, 'UTF-8//TRANSLIT', $text);
            }
            else {
                throw new PHPRtfLite_Exception('Iconv extension is not available! '
                                             . 'Activate this extension or use UTF-8 encoded texts!');
            }
        }
        $text = self::utf8ToUnicode($text);
        return self::unicodeToEntitiesPreservingAscii($text);
    }
public static function getUnicodeEntities ( $ text , $ inCharset ) { if ( $ inCharset != 'UTF-8' ) { if ( extension_loaded ( 'iconv' ) ) { $ text = iconv ( $ inCharset , 'UTF-8//TRANSLIT' , $ text ) ; } else { throw new PHPRtfLite_Exception ( 'Iconv extension is not available! ' . 'Activate this extension or use UTF-8 encoded texts!' ) ; } } $ text = self :: utf8ToUnicode ( $ text ) ; return self :: unicodeToEntitiesPreservingAscii ( $ text ) ; }
converts text with utf8 characters into rtf utf8 entites

@param string $text
converts text with utf8 characters into rtf utf8 entites