Unicode superscript fails with LaTeX
I have a block of Python code that contains Unicode superscript characters:
>>> x = ufloat_fromstr("20(1)×10⁻²")
I need the Sphinx document to be output both in HTML and LaTeX. However, LaTeX complains that the superscript minus cannot be used:
! Package inputenc Error: Unicode char \u8:⁻ not set up for use with LaTeX.
Is there a simple solution to this problem?
I thought about using :raw:, but I understand it cannot be nested inside the code block. I thought about using XeLaTeX instead of the default Sphinx pdflatex (because XeLaTeX can use OpenType fonts instead of the 256-character LaTeX fonts), but this entails writing an extension, right?… which I would like to avoid, so that my documentation can be distributed easily…