How to get rid of those funky question marks in your content…

Question posed recently on the Warriors Internet Marketing forum:

“I have a css/html template and when i add an article text and then view the page it displays all of the apostrophes and quotes as question marks. how do i fix this?”

Here’s the thing… That happens a lot when the original text came from something like an MS Word document. The problem could be unicode characters. What you *think* looks like an apostrophe or quote mark, really isn’t.

Simple fix if the problem is on a php page:

<?php

function callback($buffer) {
  $unicode_array = array(
    "&#8211;" => "-",
    "&#8212;" => "-",
    "–" => "-",
    "&#8216;" => "'",
    "’" => "'",
    "&#8217;" => "'",
    "‘" => "'",
    "&#8230;" => "...",
    "…" => "...",
    "“" => "\"",
    "&#8220;" => "\"",
    "”" => "\"",
    "&#8221;" => "\""
  );

 $rbuffer = strtr($buffer, $unicode_array);
 $retstr = '';
 for($i=0; $i < strlen($rbuffer); $i++){
   if(ord($rbuffer[$i]) >= 126) $retstr .= '&#' . ord($rbuffer[$i]) . ';';
   else $retstr .= $rbuffer[$i];
 }
 return $retstr;
}

ob_start("callback");
?>

Paste the above code to the top of your content page… it can be before the opening html tag, or before your main content. What the function does is process all remaining browser output through the callback buffer function, cleans all the pesky unicode characters it finds, then displays the cleaned up content. Viola! No more pesky question mark characters displaying :-)

Hope this helps you out!

Windows Movie Maker and YouTube


http://live.pirillo.com - Wow. Pixie and Wicket sure were tiny the day we brought them home. Watching them in Windows Movie Maker reminds me of a question from a chatter recently. He wants to know how to convert a .WMM file into an .AVI file for use on YouTube.

Source: lockergnome

How to install a WordPress Theme

This how-to video covers step-by-step instructions on how to install a WordPress Theme–Sent via http://heyspread.com : Upload videos to multiple sites quickly


Next Page →