How can you display pi superscript if it's not in Unicode? It's for a javascript program I'm making. I can't think of any way around it.

2

Best Answer


No specific Superscript-PI in Unicode yet,
but the U+2DEB   ⷫ  "Combining Cyrillic Letter Pe"  is closest, i think, At this point.
And there are other PI look-alike or alternatives character/symbol in various writing languages that is written-as & appears-like a superscript PI = Π = π :

U+2DEB - ⷫ - Combining Cyrillic Letter Pe.U+1D54 - ᵔ - Modifier Letter Small Top Half O.U+1D16 - ᴖ - Latin Small Letter Top Half O.U+2DE7 - ⷧ - Combining Cyrillic Letter El.U+A66F - ꙯ - Combining Cyrillic Vzmet.U+0346 - ◌͆ - Combining Bridge Above.U+0311 - ◌̑ - Combining Inverted Breve/Arch.U+1FC0 - ῀ - Greek Perispomeni.U+0A70 - ੰ - Gurmukhi Tippi.U+1422 - ᐢ - Canadian Syllabics Final Top Half Ring.U+18D5 - ᣕ - Canadian Syllabics Ojibway T.U+1D1AA - 𝆪 - Musical Symbol Combining Down Bow.U+1E135 - 𞄵 - Nyiakeng Puachue Hmong Tone-G.U+A8B6 - ꢶ - Saurashtra Vowel Sign I.U+1A65 -  ᩥ - Thai Tham Vowel Sign I.U+0EB4 - ິ - Lao Vowel Sign I.U+1B3X - ᬶ - Balinese Vowel Sign Ulu.U+17DD - ៝ - Khmer Sign Atthacan.

Examples:
| Eular's Identity | "n-th roots of unity" |

To view Unicode chars from various ranges, you need Unicode-fonts. For Windows & MacOS & Linux/Unix you will need to obtain *.ttf, etc font file(s) & place inside Font folder. For Android try iFont or other font installer type of app. For iOS(iPhone) try Font Diner or other font installer type of app.

by using Unicode characters:
| 𝙚 ⷫⁱ + 1 = 0 | 𝙚² ⷫⁱᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) | (just Unicode chars. No space-chars).
| 𝙚  ⷫ ⁱ + 1 = 0 | 𝙚²  ⷫ ⁱ ᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) |(sp in left of ⷫ & ⁱ).
exact code: | 𝙚  ⷫ ⁱ + 1 = 0𝙚²  ⷫ ⁱ ᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) |
above info will wrap so user can see w/o sliding left-right,
in below box user have to slide right-left to see above same info:

| 𝙚 ⷫⁱ + 1 = 0 | 𝙚² ⷫⁱᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) | (just Unicode chars. No space-chars). | 𝙚  ⷫ ⁱ + 1 = 0 | 𝙚²  ⷫ ⁱ ᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) |(sp in left of ⷫ & ⁱ). exact code: | `𝙚  ⷫ ⁱ + 1 = 0` | `𝙚²  ⷫ ⁱ ᵏᐟⁿ` (`𝑘=0,1,2,...,𝓷-1`) |

| 𝙚   ⷫ ⁱ + 1 = 0 | 𝙚 ²   ⷫ ⁱ ᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) | (more sp-chars. No <i>...</i>).
exact code: | 𝙚&#8239;&#8239; ⷫ&#8239;ⁱ + 1 = 0𝙚&#8202;²&#8239;&#8239; ⷫ&#8239;ⁱ&#8202;ᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) |
above info will wrap so user can see w/o sliding left-right,
in below box user have to slide right-left to see above same info:

| 𝙚   ⷫ ⁱ + 1 = 0 | 𝙚 ²   ⷫ ⁱ ᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) | (more sp-chars. No `...`). exact code: | `𝙚&#8239;&#8239; ⷫ&#8239;ⁱ + 1 = 0` | `𝙚&#8202;²&#8239;&#8239; ⷫ&#8239;ⁱ&#8202;ᵏᐟⁿ` (`𝑘=0,1,2,...,𝓷-1`) |

| 𝙚  + 1 = 0 | 𝙚 ² ᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) | (more sp-chars & w/<i>...</i>,<b>...</b>).
exact code: | 𝙚&#8239;<i> ⷫ</i>&#8239;<b><i>ⁱ</i></b> + 1 = 0𝙚&#8202;²&#8239;<i> ⷫ</i>&#8239;<b><i>ⁱ</i></b>&#8202;<i>ᵏᐟⁿ</i> (𝑘=0,1,2,...,𝓷-1) |
above info will wrap so user can see w/o sliding left-right,
in below box user have to slide right-left to see above same info:

| 𝙚  + 1 = 0 | 𝙚 ² ᵏᐟⁿ (𝑘=0,1,2,...,𝓷-1) | (more sp-chars & w/`...`,`...`). exact code: | `𝙚&#8239;&#8239; + 1 = 0` | `𝙚&#8202;²&#8239;&#8239;&#8202;ᵏᐟⁿ` (`𝑘=0,1,2,...,𝓷-1`) |

by using HTML <sup>...</sup>, <i>...</i>, <b>...</b>, etc tags:
eπi + 1 = 0 | e2πik/n (k=0,1,2,...,n-1) | (just regular Basic latin chars. No sp-chars).
exact code: | <i>e<sup>πi</sup></i> + 1 = 0<i>e</i><sup>2</sup><i><sup>πik<b>/</b>n</sup></i> (<i>k</i>=0,1,2,...,<i>n</i>-1) |
above info will wrap so user can see w/o sliding left-right,
in below box user have to slide right-left to see above same info:

eπi + 1 = 0 | e2πik/n (k=0,1,2,...,n-1) | (just regular Basic latin chars. No sp-chars). exact code: | `<i>e<sup>πi</sup></i> + 1 = 0` | `<i>e</i><sup>2</sup><i><sup>πik<b>/</b>n</sup></i>` (`<i>k</i>=0,1,2,...,<i>n</i>-1`) |

eπ i + 1 = 0 | e2π i k / n (k=0,1,2,...,n-1) | (sp-chars are used).
exact code: | <i>e<sup>π&#8202;i</sup></i> + 1 = 0<i>e</i><sup>2</sup><i><sup>π&#8202;i&#8202;k&#8202;<b>/</b>&#8202;n</sup></i> (<i>k</i>=0,1,2,...,<i>n</i>-1)
above info will wrap so user can see w/o sliding left-right,
in below box user have to slide right-left to see above same info:

eπ i + 1 = 0 | e2π i k / n (k=0,1,2,...,n-1) | (sp-chars are used). exact code: | `<i>e<sup>π i</sup></i> + 1 = 0` | `<i>e</i><sup>2</sup><i><sup>π i k <b>/</b> n</sup></i>` (`<i>k</i>=0,1,2,...,<i>n</i>-1`)

| Unicode-CP|Char|Char| brief info |
|----------------|--------|--------|------------|
| U+212F | ℯ | | script small-e (Eular's number) |
| U+1D452 | 𝑒 | 𝑒 | math. italic small-e |
| U+1D486 | 𝒆 | 𝒆 | math. bold-italic small-e |
| U+1D626 | 𝘦 | 𝘦 | math. sans-serif italic small-e |
| U+1D65A | 𝙚 | 𝙚 | math. sans-serif bold italic small-e |
| U+1D458 | 𝑘 | 𝑘 | math. italic small-k |
| U+1D4F7 | 𝓷 | 𝓷 | math. bold script small-n |
| U+1D70B | 𝜋 | 𝜋 | math. italic small pi |
| U+29F8 | ⧸ | | big solidus |
| U+2215 | ∕ | | division slash |
| U+2071 | ⁱ | | superscript latin small letter i |
| U+207F | ⁿ | | superscript latin small letter n |
| U+1D4F | ᵏ | | modifier letter small-k |
| U+00B2 | ² | ² | superscript two |
| U+141F | ᐟ | | canadian syllabics final acute |

Actual SP(space)-char is inside the single-quotes:
| U+202F |' ' (d)|' ' (h)|&#8239;| Narrow No-Break Space (NNBSP) |
| U+200A |' ' (d)|' ' (h)|&#8202;| Hair Space (HSP) |
| U+200D |'‍' (d)|'‍' (h)|&#8205;| Zero Width Joiner (ZWJ) |

You may also see CSS3 feature font-stretch to narrow/wide a character.

To use/display any of these Unicode chars, either use the Unicode-codepoint U+uuuu like this : Get the uuuu (hexa-decimal) numbers after the U+, and place those numbers after this &#x symbols, & end with one semicolon ; symbol, like these: &#xuuuu;
or, if HTML decimal entity number is shown for a Unicode char, then use the decimal numbers dddd after this &# symbols, & end with one semicolon ; symbol, like this: &#dddd;

References:
https://en.wikipedia.org/wiki/List_of_Unicode_characters

If this question is about HTML, try <sup>

e<sup>i&pi;</sup>

displays as

e