I have a string
in a C# application that needs to be underlined. This needs to be done in unicode as the string is exported and displayed in a word file. To do this I preceded every character with the underline unicode \u0332
which works, but it does not completely underline the 'm' character as seen in this screenshot:
I have tried preceding the \u0332
a few times before the m and after but the output is always the same.
Is there any way to get it to completely underline the character?
EDIT: I just tried using the continuous underline unicode symbol \u2381
but that does not render at all.
Unicode. Unicode has a free-standing underscore _ at U+005F, which is a legacy of the typewriter practice of underlining using backspace and overtype. Modern practice uses the combining diacritic "combining low line" at U+0332 ◌̲ that results in an underline when run together: u̲n̲d̲e̲r̲l̲i̲n̲e̲.
To make text bold and underlined, you can enclose the text in the escape sequence '\033[1;4m' and '\033[0m' . What is this? NOTE: The code '\033[0m' is used to end the bold and underlined text format.
What Is a Diacritic, Anyway? Diacritics are marks placed above or below (or sometimes next to) a letter in a word to indicate a particular pronunciation—in regard to accent, tone, or stress—as well as meaning, especially when a homograph exists without the marked letter or letters.
Social platforms like Facebook and Twitter do not support text formatting. That's to say, we can't use text styles like bold, italic, underlined, strikethrough, and custom fonts in our Tweets, replies, messages, and Twitter profile name.
U+0332 is a Unicode combining character, so ist goes after the character that it modifies. But this only specifies that the character should be underlined. The specific graphical representation depends on the application and its rendering engine; it's not fully supported everywhere. Try to paste the text i̲m̲p̲o̲r̲t̲a̲n̲t̲
into the application and see if it works as intended. If not, then there is nothing you can do, except using another representation such as *important*
or IMPORTANT
, or exporting in a supported rich text format (RTF, docx, etc.).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With