I've scraped some data off a webpage. I used Web::Scraper to find the content of interest. The content scraped has UTF-8 data in it. For example, when it scrapes content with an apostrophe, it will return something: <p>What\x{2019}s up with the water ??</p>
This bit of data then gets stored into the database. The problem is that this results in the following getting stored into the db: <p>What’s up with the water ??</p>
The database table, schema, and columns are all UTF-8. I did $dbh->{mysql_enable_utf8} = 1 on the database handler. I tried the Encode module before inserting the data into the database but I couldn't get that to work. What do I need to do to the data before storing it into the database? UPDATE:
See comment in thread for what solved the problem.
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |