I'm now developing an extension which loads it toolbarbuttons
dynamically by JavaScript.
But some characters could not be rendered, the buttons show nothing,
while fetching their labels using JS proved that their labels are
correctly set. These characters are Unicode characters, like `©', `æ',
and `½'. However, some `simpler' Unicode characters could be displayed
correctly, like `á', `à', `é', `í', and `ñ'.
Moreover, I add these characters to a menuitem, they can also be
properly displayed. And when I manually add the items to XUL, they can
also be displayed.
In conclusion, the problem is: when you create some toolbarbuttons with
JS, and set the labels dynamically, some Unicode chars could not be
rendered.
The JS for creating toolbarbutton is something like this:
var button = document.createElement("toolbarbutton");
button.setAttribute("class", "char");
button.setAttribute("oncommand", "append(this);");
button.setAttribute("label", charset[charIndex]);
container.appendChild(charButton);
Could anyone tell me how to solve this problem?
Great thanks.
Regards,
Ryan Li