Question

I am getting some problem while getting below output.

Expected OutPut :

a2,3 = a\u00B2\u066B\u00B3

Actual Output :

a2,3 = a\u00B2\u066B\u00B3

Kindly review my question and reply soon. Thanks in advance

Was it helpful?

Solution

There's no Superscript comma in Unicode.

However there are :

  • Superscript plus sign (U+207A):
  • Superscript minus sign (U+207B):
  • Superscript equals sign (U+207C):
  • Superscript left parenthesis (U+207D):
  • Superscript right parenthesis (U+207E):

Maybe you can use some other glyph, like the "dot operator" (U+22C5) to simulate a superscript comma: ¹⋅³².

You can also, of course, use NSAttributedString with a smaller font-size and an up-shifted baseline offset to simulate superscripting. However NSBaselineOffsetAttributeName is only available starting with iOS 7.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top