I show a unicode string from an xml file in a QLabel. I need to show H2O in a QLabel but with the digit ‘2’ as subscript (Unicode character U+2082). QLabel can take an html string but I can’t put this html into the xml.
It shows correctly in Linux, but in Windows it shows some garbage instead of subscript 2. I tried many different methods (incl. changing font family), but none of them works in Windows. Why?
This is probably a font issue, rather than Python. Not all fonts in Windows have U+2082. You need to pick a proper font that contains this character.
For example “Arial Unicode MS” has this. Consider the example below:
On Win 7 32-Bit it gives: