Uutiset:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu
Advertisement:

Post feeder help

Aloittaja Biology Forums, heinäkuu 07, 2014, 07:51:58 IP

« edellinen - seuraava »

Biology Forums

My feed poster software cannot distinguish certain html characters like those highlighted in attachment one. So, when it posts the feed, those characters become question marks. I have also attached the code responsible for posting the feed:

$msg_body = '';

if ($feed['html'])
{
//echo "body: " . $context['feeditems'][$i]['description'];
$msg_body =  ($context['feeditems'][$i]['description']);
$msg_body = $func['htmltrim']($msg_body);
preparsecode($msg_body);
$msg_body = '[html]'' . $msg_body . '[/html]';

$msg_body  .=  $func['htmlspecialchars']();

if (!empty($feed['footer']))
$msg_body .=  $func['htmlspecialchars']("\n\n" . $feed['footer'], ENT_QUOTES);


}


I was hoping someone could tell me how I could fix this code so that those characters show properly. It is not a database language issue because when I manually use [html] with the exact same html as shown in the picture, those characters are presented properly, so it has to be the code that is preparing the feed.

Arantor

So, what's the feed, and is your forum UTF-8 or not? (It clearly is an encoding issue even if you're convinced it's not.)

Also, why isn't this in the thread for the mod in question?
Holder of controversial views, all of which my own.


Biology Forums

Because I've tried the mod author, and his response is - I'm busy. My community can't run on anyone's watch.

My forum is configured with UTF-8. Like I said, I tried the exact same html when I manually posted the thread and all characters showed correctly. Thus, I'm convinced it's the way the mod if written.

Arantor

Your theory about it being the mod is correct but for totally the wrong reason.

When you copy/paste it manually, your browser is transliterating it into UTF-8 FOR YOU so it's correct. Even though as ever you refuse to provide enough information, it's a fairly good guess from what you have told me that the feed is Win-1252.
Holder of controversial views, all of which my own.


Biology Forums

Anyone else shed some light on how I could alter the code so I don't run into this trouble again?

Arantor

How about you start by listing the feed URL so that we can actually verify rather than guess?

Oh wait, that would be in the definition of not being nice. Eh.
Holder of controversial views, all of which my own.



Biology Forums

Any coders out there willing to toss me a bone here? :-/

Advertisement: