Can I have the special char (for example superscript, subscript) with tridion keywords/categories display text field and display that in Tridion DXA application.
I presume you're wanting to publish the keyword and use it for display in your output channel?
So you'll likely have noted that if you take formatted text and copy, say from Word, and then paste into the GUI you'll see all formatting (see the end of the post - some special characters are not considered 'formatting') removed - so that's not an option.
You can add specific HTML tags, such as
<sup>, but these will be escaped and I'd avoid taking content from a user and directly uneconding to valid HTML.
You can use your own notation - you'll likely have seen square brackets used a lot - to indicate start and end of 'some' sort of formatting you require. Using this method your Content Delivery Environment decides on the required presentation (e.g. you may want superscript note1 in desktop/print but in mobile,
(note1) is better) so "
[sup]note1[/sup]" can now be displayed however your channel decides is best suited.
Of course if by 'special char' you mean specific characters such as copyright (©) where these can be pasted directly from applications such as Word.
Some things to watch for are - Size of the keyword - there is a limitation and extra notation for formatting etc. will consume space - Special formatted characters may cause issues with some types of output (for example, if you wanted to inject certain characters into a JSF tag it's likely going to cause problems) - Put some consideration in to ensure you get the balance between the technical requirement and the editor experience right
The Keyword title and description are intended as plain text; they can be abused for formatted text as Mark explained.
However, Keywords can also have custom metadata. So, you could put formatted text in a Rich Text Field in custom metadata. DXA will include Keyword metadata when expanding linked Keywords (for Keyword fields). You can use DXA’s semantic mapping to map Keyword metadata fields to properties on a Keyword Model.