Suggestion for superscripts

Don Peterson someonesdad1 at gmail.com
Thu Jun 3 13:29:42 CDT 2021


For about a decade I have been wanting to be able to print Unicode
superscript characters in the output of some programs.  The most common use
case for this is to print the exponents to physical units.  An example is
kg·m/s², which is a bit easier on the eyes and brain than kg*m/s**2.

Unfortunately, the current version 13 character set doesn't have enough
superscript characters to support common scientific usage.  From the
ucd.nounihan.grouped XML file for version 13, these are the superscript and
subscript characters I could find:

Superscripts: ⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁺ ⁻ ⁼ ⁽ ⁾ ⁱ ⁿ
Subscripts:   ₀ ₁ ₂ ₃ ₄ ₅ ₆ ₇ ₈ ₉ ₊ ₋ ₌ ₍ ₎ ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵩ

Superscript characters are lacking for two fairly common use cases:
floating point exponents and fractional exponents.  These would be possible
with the addition to the superscripts of the two common radix characters
'.' and ',' and a solidus character.  However, it seems to me that *the
Unicode design should aim at least at putting all printable 7-bit ASCII
characters and the upper and lower case Greek characters commonly used in
technical work in both the subscript and superscript sets*.  I've never
commented on this before because I thought it was obvious and would be
fixed in the next Unicode revision.  I remember looking at this pretty
carefully around version 7 and being surprised by the lack.  Being a lazy
retired person for the last 20 years meant I didn't do anything about it,
which I now regret.  :^)

Because of this lack of superscript characters, one of my library functions
is forced to produce syntactically-correct but ugly output such as
m**0.75·Pa**-1.3·s⁻²·K⁻¹
for a units string input of "m(3/4) Pa(-1.3)/(s2*K)" (with syntax similar
to the GNU units program).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://corp.unicode.org/pipermail/unicode/attachments/20210603/564a2189/attachment-0001.htm>


More information about the Unicode mailing list