UTF-8 encoding for sub and superscript. Are those supported on UTF-8?

Hi;

I have some content sub and superscript that i should put in my xml. Are those supported on UTF-8?

Regards.
LVL 12
jazzIIIloveAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert BormansInformation ArchitectCommented:
All unicode charcters can be expressed in a UTF-8 encoding in XML
in that sense UTF-8 is a "complete" encoding for XML
unicode table is here:
http://unicode-table.com/en/
If your editor does not support entering UTF-8 straight from the keyboard, you can always use numeric character entities
eg. for unicode codepoint 178 (superscript 2) use
²

Open in new window

If you do it that way, your character is also safe for encodings that don't support the full unicode
0
Geert BormansInformation ArchitectCommented:
Where the other characters are in the unicode standard can be found here

http://en.wikipedia.org/wiki/Unicode_subscripts_and_superscripts
0
jazzIIIloveAuthor Commented:
Hi;

Thanks for the reply. I checked codepoint 178 in the link, but it was another character. can you attach a screenshot by circling it?

My question also involves superscript of, say, letter k. Is that one there too?

Regards.
0
Geert BormansInformation ArchitectCommented:
note that there are two ways of expressing numeric character entities
numeric decimal
²

Open in new window

or numeric hexadecimal
²

Open in new window

(note the X after the # for the hex number)
both are the same character only expressed differently
please try to add the 178  numeric entity in a html and check in the browser, you will see I am right, that definitely is superscript 2

Your question did not mention "k" etc. But if you look at the table, you will find at least teh subscripts expressed... hint: you can search the table through the search box using the word "subscript" by example
the subscript "k" is
 ₖ

Open in new window

but that is an more obscure font... in order to visualize it you will need a font with full support of unicode
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.