Mozda najbolje resenje je da konvertujesh string u UTF-8. Pa poste takav string staish u bazu
PHP kôd:
<?php
$url = "neki url";
$input = file_get_contents($url) or die('Could not access file: $url');
if(preg_match_all('/<span>(.*?)<\/span>/s', $input, $matches, PREG_SET_ORDER)) {
foreach($matches as $match) {
//konvertuje string u UTF-8 enkodovanje
$str=mb_convert_encoding($match[1],"UTF-8","Windows-1250");
echo ($str) . "<br/><br/>";
}
}
?>