• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 534
  • Last Modified:

Display Unicode in RSS ????

Here is my link:
http://connekgroup.net/rss/rss.php
 I use RSS Randomizer. But it doesn't display Unicode ??? What can i do now ???
Thank a lots !!!!
0
hiepbeo
Asked:
hiepbeo
1 Solution
 
AmigoJackCommented:
that is because your output isnt unicode at all. if the output (what your php produces and then comes as site to the client) is plain ascii its obvious that it cant be displayed. as far as i know, php doesnt support unicode...
0
 
dr_dedoCommented:
current PHP has -little- support for unicode, but it's assumed to fixed in PHP6 http://www.php.net/manual/en/ref.unicode.php, till then, u can use that cusotm function which i grapped fromhttp://www.randomchaos.com/documents/?source=php_and_unicode

function utf8_to_unicode( $str ) {
        $unicode = array();        
        $values = array();
        $lookingFor = 1;
       
        for ($i = 0; $i < strlen( $str ); $i++ ) {
            $thisValue = ord( $str[ $i ] );
            if ( $thisValue < 128 ) $unicode[] = $thisValue;
            else {
                if ( count( $values ) == 0 ) $lookingFor = ( $thisValue < 224 ) ? 2 : 3;
                $values[] = $thisValue;

                if ( count( $values ) == $lookingFor ) {
                    $number = ( $lookingFor == 3 ) ?
                        ( ( $values[0] % 16 ) * 4096 ) + ( ( $values[1] % 64 ) * 64 ) + ( $values[2] % 64 ):
                          ( ( $values[0] % 32 ) * 64 ) + ( $values[1] % 64 );
                    $unicode[] = $number;
                    $values = array();
                    $lookingFor = 1;
                } // if
            } // if
        } // for
        return $unicode;
    } // utf8_to_unicode

hope it helps
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now