thanks for your suggestion. i have this function. It's slow, but fortunately it only has to run once when i import the data.
function html_curly_quotes($text) {
$result = $text;
$result = str_replace(chr(145), "‘", $result);
$result = str_replace(chr(146), "’", $result);
$result = str_replace(chr(147), '“', $result);
$result = str_replace(chr(148), '”', $result);
return $result;
}
Seems to me a bit odd that htmlspecialchars won't handle curly quotes.