If I just put in XUL file
<label value="°C"/>
it works fine. However, I need to assing ° value to that label element and it doesn’t show degree symbol, instead literal value.
UPD
sorry guys, I just missed couple words here – it doesn’t work from within javascript – if I assign mylablel.value = degree + "°" – this will show literal value.
It does show degree symbol only if I put above manually in XUL file.
What happens when you use a JavaScript escape, like
"\u00B0C", instead of"°C"?Or when using
mylabel.innerHTMLinstead ofmylabel.value? (According to MDC, this should be possible.)EDIT: you can convert those entities to JavaScript escapes using the Unicode Code Converter.