Converting special characters outside the basic latin

I’m looking for some help on using get_html_translation_table(). There’s a nice function on php.net for adding some of the special characters not included in the htmlentities(). Characters that might be pasted from Word or special Keystrokes (on my mac - like for a curly quote). How can I run this function with the php that sets up my xml. See code below. Any help would be much appreciated.

Here’s the function I would like to use on my xml.php output file.

function get_html_translation_table_CP1252() {
    $trans = get_html_translation_table(HTML_ENTITIES);
    $trans[chr(130)] = '‚';    // Single Low-9 Quotation Mark
    $trans[chr(131)] = 'ƒ';    // Latin Small Letter F With Hook
    $trans[chr(132)] = '„';    // Double Low-9 Quotation Mark
    $trans[chr(133)] = '…';    // Horizontal Ellipsis
    $trans[chr(134)] = '†';    // Dagger
    $trans[chr(135)] = '‡';    // Double Dagger
    $trans[chr(136)] = 'ˆ';    // Modifier Letter Circumflex Accent
    $trans[chr(137)] = '‰';    // Per Mille Sign
    $trans[chr(138)] = 'Š';    // Latin Capital Letter S With Caron
    $trans[chr(139)] = '‹';    // Single Left-Pointing Angle Quotation Mark
    $trans[chr(140)] = 'Π   ';    // Latin Capital Ligature OE
    $trans[chr(145)] = '‘';    // Left Single Quotation Mark
    $trans[chr(146)] = '’';    // Right Single Quotation Mark
    $trans[chr(147)] = '“';    // Left Double Quotation Mark
    $trans[chr(148)] = '”';    // Right Double Quotation Mark
    $trans[chr(149)] = '•';    // Bullet
    $trans[chr(150)] = '–';    // En Dash
    $trans[chr(151)] = '—';    // Em Dash
    $trans[chr(152)] = '˜';    // Small Tilde
    $trans[chr(153)] = '™';    // Trade Mark Sign
    $trans[chr(154)] = 'š';    // Latin Small Letter S With Caron
    $trans[chr(155)] = '›';    // Single Right-Pointing Angle Quotation Mark
    $trans[chr(156)] = 'œ';    // Latin Small Ligature OE
    $trans[chr(159)] = 'Ÿ';    // Latin Capital Letter Y With Diaeresis
    ksort($trans);
    return $trans;
}

And the php that outputs my xml:

echo "<winesbyglass menu_name=\"WINES BY THE GLASS\">
";
while ($rowGlass = mysql_fetch_assoc($resultGlass)) {
// you need to use the htmlentities to get the accented characters in flash.
// unfortunately, curly quotes are outside the set of entities that can be converted.
echo "	<category category_name=\"".htmlentities($rowGlass['category'])."\">".htmlentities($rowGlass['menuitems'])."</category>
";}
mysql_free_result($resultGlass);
echo "</winesbyglass>
";