WordPress.org

Ready to get started?Download WordPress

Forums

rss.php bad charset (8 posts)

  1. LockeAG4
    Member
    Posted 5 years ago #

    Hi everyone , I know this is a common questio but I really not see a real solution,so I hope sombody can help me to resolve this.

    let's see..

    I use the so common

    <?php
                  include_once(ABSPATH . WPINC . '/rss.php');
                  wp_rss('http://feeds.feedburner.com/reloadedvnn', 5);
                  ?>

    to display 5 latest post from other blog and forum on my site.

    First of all I need to indicate the evident:

    site: "http://vnnonline.net"
    language: "spanish"
    WP version: 2.7 both.

    First I was thinking that was problem of the charset of my forum so I decide to change all tables to UTF-8 in vbulletin, at the moment it seems that resolve the problem in the RSS of the Forum, but my other blog is WP2.7 already in UTF-8 and some spanish characters are not showing well.

    I use Feedburner for this purpose , and I validate it and all goes well.

    So now I don't have any clue of what the problem is.

    If somebody have the solution please, give me a hand.

    thanks

  2. LockeAG4
    Member
    Posted 5 years ago #

    SET 2

    I just try with another charset like "ISO-8859-1", and nothing happens , I check the tables of my main blog and some tables are latin1_swedish_ci ¿? most of it are plugins tables...

    any idea?

    thanks

  3. LockeAG4
    Member
    Posted 5 years ago #

    any idea? please

  4. LockeAG4
    Member
    Posted 5 years ago #

    SET 3 , Help , I need sombody help , no just anybody ....please

  5. LockeAG4
    Member
    Posted 5 years ago #

    SET 4 : THE SOLUTION:

    <?php
    require_once (ABSPATH . WPINC . '/rss.php');
    $rss = @fetch_rss('http://YOURFEED');
    if ( isset($rss->items) && 0 != count($rss->items) ) {
    ?>
    <ul>
    <?php
    $rss->items = array_slice($rss->items, 0, 5);
    foreach ($rss->items as $item ) {
    ?>
    <li>
    <a href='<?php echo wp_filter_kses($item['link']); ?>'>
    <?php echo wp_specialchars($item['title']); ?>
    </a>
    </li>
    <?php } ?>
    </ul>
    <?php } ?>

    See'a

  6. kReEsTaL
    Member
    Posted 4 years ago #

    Great solution, it works perfectly (I run a French blog). Thank you so much for sharing! :)

  7. carpenoctem
    Member
    Posted 4 years ago #

    Thank you very much! Works like a charm!

  8. Lovedoodle
    Member
    Posted 4 years ago #

    Thanks so much for posting your solution, LockeAG4! it's perfect!

Topic Closed

This topic has been closed to new replies.

About this Topic