Use the dedicated characters ® or ™ as trademark signs.
UPDATE contact SET name = 'RACH™' WHERE id='10782' -- '™' not 'ᵀᴹ'
Some other characters (but not all!) have superscript variants in unicode, but many fonts don't support these exotic code points and don't even include glyphs to represent them. I would generally discourage to use any of these except the common ¹ ² ³ . You would normally use formatting to achieve a superscript effect.
For instance, here on SO, you could use: demo superscript ABC
That's the output of <sup>demo superscript ABC</sup>
More info on the Wikipedia page on superscript characters.
If you need a mapping function use translate()
. would be very inefficient.replace()
in a loop
translate('TM', 'ABDEGHIJKLMNOPRTU', 'ᴬᴮᴰᴱᴳᴴᴵᴶᴷᴸᴹᴺᴼᴾᴿᵀᵁ');