Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unicode underline does not completely underline some characters

Tags:

string

unicode

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 \u0332which works, but it does not completely underline the 'm' character as seen in this screenshot:

enter image description here

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.

like image 646
Saggio Avatar asked Oct 31 '13 13:10

Saggio


People also ask

How do you underline text in Unicode?

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̲.

How do you underline a character in python?

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 does a line under a letter mean?

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.

How do you underline on twitter?

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.


1 Answers

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.).

like image 127
Sebastian Negraszus Avatar answered Nov 05 '22 04:11

Sebastian Negraszus