lib/PHPRtfLite/Utf8.php
private static function unicodeToEntitiesPreservingAscii($unicode)
    {
        $entities = '';

        foreach ($unicode as $value) {
            if ($value != 65279) {
                $entities .= $value > 127
                             ? '\uc0{\u' . $value . '}'
                             : chr($value);
            }
        }

        return $entities;
    }
private static function unicodeToEntitiesPreservingAscii($unicode)
    {
        $entities = '';

        foreach ($unicode as $value) {
            if ($value != 65279) {
                $entities .= $value > 127
                             ? '\uc0{\u' . $value . '}'
                             : chr($value);
            }
        }

        return $entities;
    }
private static function unicodeToEntitiesPreservingAscii ( $ unicode ) { $ entities = '' ; foreach ( $ unicode as $ value ) { if ( $ value != 65279 ) { $ entities .= $ value > 127 ? '\uc0{\u' . $ value . '}' : chr ( $ value ) ; } } return $ entities ; }
converts text with utf8 characters into rtf utf8 entites preserving ascii

@param  string $unicode
@return string
converts text with utf8 characters into rtf utf8 entites preserving ascii