23

While making a translation to a YouTube video (translations can only be in Unicode, no other markup is possible as far as I know of), I stumbled across the concentration of H+ in orange juice. It is supposed to be one times ten to the negative 3.5 molar.

I'd like to write it down as "1·10-3,5 M" (mind the comma, it is translated to dutch). The problem is that I can not find a superscript comma or even a superscript period between all 120,520 unicode graphical characters.

Does someone have an idea on how to solve this?

3
  • 2
    You have to stop taking the easy route and actually make your text properly superscript. Dec 18, 2015 at 7:30
  • 8
    @NicolBolas tell that to Google/YouTube :), they do not allow HTML tags in subtitles. Dec 18, 2015 at 7:37
  • 5
    That's a really curious omission! en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts says "These characters allow any polynomial, chemical and certain other equations to be represented in plain text without using any form of markup like HTML or TeX." but this omission seems like a rather significant gap for that particular use case. (There is no superscript or subscript period, either, so even the Americans don't get more than the rest of us, this time.)
    – tripleee
    Dec 18, 2015 at 8:03

6 Answers 6

9

There exists two, but the first is more useful for your use case.

U+1d112 Musical Symbol Breath Mark

𝄒

U+02BC Modifier Letter Apostrophe

ʼ

edit: thanks to Rahul Tripathi, I've looked into a period character. U+22C5 Dot Operator

On most fonts, it looks real weird. But on the font Palatino, it's perfect.

8

As far as I know there is no unicode for superscript comma however you can use (U+22C5) as dot seperator.

2
  • 2
    It is not a real comma, but I think it can do. The reader will understand what it means I think. Still strange that some characters you take for granted that they will exist are not in there (how would you do a thousands separator in a large exponential for example?). Dec 18, 2015 at 7:36
  • 2
    @AutomatedChaos:- I would add a space or may be leave it without comma as there is no other option left in that case. Dec 18, 2015 at 8:27
6

The Greek Ano Teleia (U+0387) looks decent with some fonts:

·

Here's an example of what it would look like in your particular case (all of the superscript characters are Unicode characters):

1·10⁻⁴·⁵ M

In this example it looks really good, but in other fonts, the character hovers closer to the middle (vertically) of the superscript characters.

Even in fonts that it does look good with, if you increase the font-size enough, it becomes apparent that the dot is not quite where it needs to be.

I really wish that an official superscript/subscript decimal point would be added to the Unicode standard as all of the characters that can be used to substitute these characters are font (and sometimes size) dependent, so there's no guarantee that they'll look good in all use-cases.

5

The Unicode superscript (and subscript) code points are for backwards compatibility with older character sets and are essentially deprecated. They are not intended to be complete, or be used to format text. If you need to use superscript characters, the recommended (and most complete/compatible) approach is to use a markup language.

If no markup language is available, then you're simply out of luck. Hacking in other character that look similar may appear to be a usable workaround, but damages any semantic value to the text – for example, U+22C5 may be mechanically parsed as a multiplication of the adjacent numbers.

3
  • 11
    What a nonsense. Evidently, font designers do a far better job at designing sub- and superscripts than the simulated <sub> and <sup> tags do. Moreover, these tags are not available in <form> or <textarea> fields. Aug 27, 2017 at 15:07
  • 1
    @SergeStroobandt Can't agree with the "font designers do a far better job" part. On my browsers, Unicode superscripts are practically unreadable. Otherwise, I would surely prefer to use Unicode.
    – Erki Aring
    Dec 3, 2018 at 9:07
  • 4
    " but damages any semantic value to the text" - also consider the impact on people using screenreaders: the output will be consfusing, at best. Sep 28, 2020 at 11:25
5

No, there is no specific superscript comma in Unicode yet,
but ALTERNATIVE/OTHER CHARACTERS that look-alike or close-to COMMA-symbol can be used, such as this ˒ U+02D2 or U+2E34 character.
i have included few other Unicode codepoint for related characters used here.
|- - - - - - - - - - - -
| UNICODE-     |Example-|GLYPH-in-|HTML-      |
| -CODEPOINT:|-GLYPH:|   -CODE:   |-DECIMAL:| DESCRIPTION: | LOOKS-LIKE: |
| U+UUUU: |GLYPH: |CODE:       |"example"-LINE: |
|- - - - - - - - - - - -
| U+02D2 | ˒ | ˒ | &#722; | Modifier Letter Centered Right Half Ring | as superscript-comma |
| U+02D2 | "1·10⁻³˒⁵ M". | "1·10⁻³˒⁵ M". | example |
|- - - - - - - - - - - -
| U+2E34 | ⸴ | |&#11828;| Raised Comma | as superscript-comma |
| U+2E34 | "1·10⁻³⸴⁵ M". | "1·10⁻³⸴⁵ M". | example |
|- - - - - - - - - - - -
| U+0F21 | ༡ | | &#3873; | Tibetan Digit One | as superscript-comma |
| U+0F21 | "1·10⁻³༡⁵ M". | "1·10⁻³༡⁵ M". | example |
|- - - - - - - - - - - -
| U+1046E | 𐑮 | 𐑮 |&#66670;| Shavian Letter Roar | as superscript-comma |
| U+1046E | "1·10⁻³𐑮⁵ M". | "1·10⁻³𐑮⁵ M". | example |
|- - - - - - - - - - - -
| U+1D112 | 𝄒 | 𝄒 |&#119058;| Musical Symbol Breath Mark | as superscript-tiny-comma |
| U+1D112 | "1·10⁻³𝄒⁵ M". | "1·10⁻³𝄒⁵ M". | bold "1·10⁻³𝄒⁵ M". | example |
|- - - - - - - - - - - -
| U+02BE | ʾ | ʾ | &#702; | Modifier Letter Right Half Ring | as superscript-apostrophe |
| U+02BE | "1·10⁻³ʾ⁵ M". | "1·10⁻³ʾ⁵ M". | example |
|- - - - - - - - - - - -
| U+02BC | ʼ | ʼ | &#700; | Modifier Letter Apostrophe | as superscript-apostrophe |
| U+02BC | "1·10⁻³ʼ⁵ M". | "1·10⁻³ʼ⁵ M". | example |
|- - - - - - - - - - - -
| U+2027 | ‧ | | &#8231; | Hyphenation Point     | as superscript-dot |
| U+2027 | "1·10⁻³‧⁵ M". | "1·10⁻³‧⁵ M". | example |
|- - - - - - - - - - - -
| U+203A | › | | &#8250; | Single Right Pointing Angle | as superscript-comma or greater-than|
| U+203A | "1·10⁻³›⁵ M". | "1·10⁻³›⁵ M". | example |
|- - - - - - - - - - - -
| U+00B3 | ³ | ³ | &#179;  | Superscript Three. |
| U+2075 | ⁵ | | &#8309; | Superscript Five. |
| U+207B | ⁻ | | &#8315; | Superscript Minus. |
| U+00B7 | · | · | &#183;  | Middle dot.       |
|- - - - - - - - - - - -

To use any symbol shown above, either use the HTML-DECIMAL: (HTML DECIMAL ENTITY REFERENCE) column's code, that starts with &# symbols, & ends with a semicolon ; symbol, like this: &#dddd;
Or, use the shown Unicode-Codepoint (hexa-decimal) UUUU numbers, which are shown after the U+ in above lines, and begin those UUUU numbers after this &#x code, & at-end of numbers use one ; semicolon symbol, like this: &#xUUUU;
Both way will produce same character/symbol.

SPACE SYMBOLs are actually inside the single-quotes:
| U+202F |' '|' '|&#8239;| Narrow No-Break Space (NNBSP) |
| U+200A |' '|' '|&#8202;| Hair Space (HSP) |
| U+200D |'‍'|'‍'|&#8205;| Zero Width Joiner (ZWJ) |
( in MonoSpace font (aka Fixed-Width font), the NNBSP or HSP, etc space characters may be shown as having a same fixed-width as other characters )

DISPLAY SAME UNICODE ˒=˒=U+02D2=&#722; SYMBOL IN DIFFERENT WAYS:

Unicode chars (from non-Basic-latin range) shown as general text here in below/next line in StackOverflow:
   "1·10⁻³˒⁵ M".
now shown with inline <code>...</code> tag or inside `...` :
   "1·10⁻³˒⁵ M".
shown with <b>...</b> tag or **bold** :
   "1·10⁻³˒⁵ M".
shown with <i>...</i> tag or _italic_ :
   "1·10⁻³˒⁵ M".
shown with a NNBSP &#8239; after the U+02D2 as general text:
   "1·10⁻³˒ ⁵ M".
shown with a HSP &#8202; after the U+02D2 as general text:
   "1·10⁻³˒ ⁵ M".
shown with a ZWJ &#8205; placed before the U+02D2 as general text:
   "1·10⁻³‍˒⁵ M".

At the time of writing this answer, StackExchange/StackOverflow,etc website's webpages were written to use different fonts & font-attributes via CSS-code (a component of webpage), So same glyph/character is appearing/shown differently in different platforms/devices, As all are not-using same font or same rendering software, etc.

DISPLAY COMMA WITH HTML SUPERSCRIPT TAG:
Regular chars (from Basic-latin range) with (regular) , comma-symbol, are now shown in below/next line, by using superscript HTML-tag, (specially the "-3,5" portion, with Superscript(<sup>...</sup>) HTML tag) :
   "1·10-3,5 M".

WHY THE SYMBOL APPEARS DIFFERENTLY (OR DOES-NOT-APPEAR) ?
Inside the <code>...</code> or <pre><code>...</code></pre> HTML-tags based code-block, it (U+02D2) is appearing correctly on StackOverflow webpage, when viewed from Firefox,Safari,etc web-browser on MacOS-X, iOS/iPhone, etc, & it also appears correctly when viewed from Firefox on Android, but not from Chrome on Android. Code tag uses monospace font (and a smaller font-size).
Sometime a HSP might be needed after the U+02D2, or a ZWJ might be needed before the U+02D2, to show it properly across different web-browsers.
There are also CSS commands to force monospace(aka fixed-width font) characters appearing as non-fixed-width (aka variable-width, aka proportional), look into these CSS: font-variant-numeric, font-variant, letter-spacing2, etc.

It (U+02D2) appears correctly (as a tiny half-ring which looks-like a superscript comma) as general text, on (most) other websites, when viewed through a supported web-browser on supported platform/OS.
Here the "supported" means, when a web-browser or the OS (where web-browser is running), includes necessary fonts with all characters from those UNICODE-RANGES which are related to Superscript (range U+2070--U+209F) & Spacing Modifiers (range U+02B0--U+02FF), and also includes a good font-glyph rendering engine to display characters/symbols correctly.

Some web-browser(s) & some platform(s)/OS(-es) do not include full support, that is they do not have/include fonts with all necessary glyphs/characters of those UNICODE-RANGES inside their included font, or they do not have a good font-glyph rendering engine, So they cannot show (or cannot properly show) some Superscript numbers (from 4 to 9, & the 0), and also cannot show some of the Modifier-letters.

To solve it, first assist your web-browser & your OS, by loading multiple Unicode-fonts (Unicode-typefaces) that includes those needed Unicode characters/ranges. Usually this would solve major problems, but if it can't then a good font rendering engine is also required for your OS or for your web-browser.

REFERENCES:

1
  • 1
    Thank you for this. ˒ U+02D2 worked perfectly for my use case (IG bio). Sep 21, 2020 at 14:27
0

I had 40,000 for an exponent and was looking for a superscript comma. The best I could find was a Calibri U+031B, a combining horn, so I was able to make a reasonable looking exponent: one chance in 10⁴⁰̛ ⁰⁰⁰ of life originating by natural means. When I was using it in combination with Times New Roman, I had to add a extra space after the combining horn, but here I had to delete that extra space. After posting, it looks like that effect is defeated.

1
  • Now try reading that with a screen reader. Nov 24, 2021 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.