12

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

Don Code
  • 781
  • 3
  • 12
  • 25

4 Answers4

8

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

asiby
  • 3,229
  • 29
  • 32
6

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.

Rom
  • 4,129
  • 23
  • 18
  • I am using Python 2.6.6 though! And until now I haven't had any problems with UTF8. Can you give me an example, how I would do what you did up there in Python?! thanks! – Don Code Jul 07 '11 at 19:02
  • @Dielli Hoxha: it's not the question what _language_ you use: it's the question what _rendering engine_ you use: HTML, Windows API, Application Kit, WebKit, TeX, etc. Note that any of these APIs can be used from Python (except perhaps AppKit), but the way to generate subsript is unique for each of them. – Rom Jul 07 '11 at 19:23
  • Could you give me an example of how I would do that in Python. I have been trying to make it work but couldnt. Thanks! – Don Code Jul 11 '11 at 18:42
  • The following links show lots of unicode superscripts and subscripts for Latin characters ... http://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts – asiby Nov 28 '12 at 16:54
3

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.

Dilip Rajkumar
  • 7,006
  • 6
  • 60
  • 76
1

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.

Jukka K. Korpela
  • 195,524
  • 37
  • 270
  • 390