UTF8 symbols for subscript letters

2019-06-16 21:04发布

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 as subscripts for UTF8

Thanks for the help.

here is the link for a UTF8 character table: http://tlt.its.psu.edu/suggestions/international/bylanguage/mathchart.html

4条回答
神经病院院长
2楼-- · 2019-06-16 21:36

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.

查看更多
等我变得足够好
3楼-- · 2019-06-16 21:46

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.

查看更多
唯我独甜
4楼-- · 2019-06-16 21:52
The star\"
5楼-- · 2019-06-16 21:55

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.

查看更多
登录 后发表回答