We could not find where this encoding was occuring, but support suggested inserting the actual character instead of the HTML entity. That worked, but could cause encoding problem. Then I found this article.
javascript-how-to-dynamically-create-an-option-that-contains-an-html-entity
It appears that the use of "new Options()" automatically encodes the characters input into the option. The answer is to use unicode escape characters, but then WA DD adds backslashes, so I had to remove the function WA_DD_Replace from the text value and make sure I properly escape the input my function returned.
So instead of ½ I use /u00bd then remove the function WA_DD_Replace from that value. My new function looks like this for javascript functions
function dimFmtList($dim_size) {
if (($dim_size - floor($dim_size)) != 0) {
if (($dim_size - floor($dim_size)) == 0.25) {
$dim_part = "\u00bc\'";
} elseif (($dim_size - floor($dim_size)) == 0.5) {
$dim_part = "\u00bd\'";
} elseif (($dim_size - floor($dim_size)) == 0.75) {
$dim_part = "\u00be\'";
} else {
$dim_part = "\'";
}
} else {
$dim_part = "\'";
}
return floor($dim_size).$dim_part;
}
I used this char table:
www.utf8-chartable.de/
My javascript that populates the drop down now looks like this:
echo "WAJA[".$n."][".$m."] = new Array();\n";
echo "WAJA[".$n."][".$m."][0] = "."'".WA_DD_Replace($row_shedSizes["id"])."'".";\n";
// echo "WAJA[".$n."][".$m."][1] = "."'".WA_DD_Replace(dimFmtList($row_shedSizes["width"])."x".dimFmtList($row_shedSizes["depth"])." with ".dimFmtList($row_shedSizes["sidewall"])." Sidewalls and a ".dimFmtList($row_shedSizes["peak"])." Peak")."'".";\n";
echo "WAJA[".$n."][".$m."][1] = "."'".dimFmtList($row_shedSizes["width"])."x".dimFmtList($row_shedSizes["depth"])." with ".dimFmtList($row_shedSizes["sidewall"])." Sidewalls and a ".dimFmtList($row_shedSizes["peak"])." Peak"."'".";\n";