UTF8 symbols for subscript letters

后端 未结 4 1344
遥遥无期
遥遥无期 2021-01-18 02:02

I have been looking online for the UTF8 character table. And all I could find for subscripts were numbers 1 to 9 and some of latin letters.

I need to find S and B a

相关标签:
4条回答
  • 2021-01-18 02:13

    UNICODE doesn't have representation of all latin letters in subscripts and superscripts: just a few of those. You'll have to use markup to do that.

    For example, if you're using HTML, you can use the following markup:

    example<sub>S</sub>
    

    which gets converted into exampleS.

    Same functionality is available in many other text rendering engines: TeX, etc. If you're displaying it in WinForms or something similar, unfortunately, you'll have to do it yourself.

    Also, regarding the "UTF8". It's just an encoding of the UNICODE table. UTF8 can encode any UNICODE character, as does UTF16, UTF32 and others. Therefore, your question is really about existence of latin subscript characters in UNICODE.

    0 讨论(0)
  • 2021-01-18 02:20

    I know its a old post, following is the list of characters having unicode equivalent. For other alphabets we dont have. hope it helps

    http://www.unicode.org/charts/PDF/U2070.pdf

    I created a small library to convert sub/super script to its equivalent UTF character.

    https://github.com/DilipRajkumar/Select-With-Sub-Super-tags/tree/master

    hope it helps.

    0 讨论(0)
  • 2021-01-18 02:22

    You can find what you are looking for at http://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts

    0 讨论(0)
  • 2021-01-18 02:23

    The authoritative reference on what characters there are in Unicode is the Unicode Standard. You can find the relevant information in the PDF code charts. The most commonly needed subscript characters are in the “Superscripts and subscripts” block. To get a full list, check the Unicodedata.txt file and search for characters with <sub> in their description. Beware that many of them are for specialized used, e.g. in phonetic notations, and may work poorly outside such usage, if the glyphs have been designed for the special use.

    0 讨论(0)
提交回复
热议问题