Hi Fayna,
I suspect two things are being mixed up here...
The data type char represents a single 16-bit character. The special characters as mentioned in the description of the data type char are escape sequences to use them instead of a character code. For example you can use in your code the character '\n' instead of using the code 0x000A. It is still a 16-bit character.
The text view supports a few special characters that can be used to control the text output:
- The signs ~ (tilde) are treated as soft-hyphens. They determine potential candidates to wrap a word. These signs are not displayed until the text wrap took place at their position. In such case the affected text row is terminated with an additional hyphen - sign indicating that the word has been broken there.
- The signs ^ (circumflex) are treated as silent soft-hyphens. They determine potential candidates to wrap a word. These signs are never displayed nor replaced by any hyphen even if the text wrap took place at their position. They are simply silent.
In order to display the tilde or the circumflex, the percent character has to be used - you have to prefix it within the string explicitly by an additional % (percent) character. This applies also to the percent character itself.
This means, to display a % sign within a text view, you need to have two consecutive % characters within the string. This two % characters cannot be stored in one variable of the data type char.
I hope I was able to explain it a bit.
Best regards,
Manfred.