27

Is there a character equivalent to the underscore " _ " which occupies the upper position? Dash " - " will not do. If it were me, I would call it upper-score. But I do not see this anywhere.

j0h
  • 1,460

4 Answers4

23

What you seek is generally known as a "macron", "overline", "overscore", or "overbar". It exists at several Unicode code points; which one you want depends on whether you want a macron or an overline (the former being shorter), and whether or not you want a combining character.

From Wikipedia, an overline may be found at U+203E (spacing) or U+0305 (combining), and a macron at U+00AF or U+02C9 (spacing, and apparently identical in appearance), or U+0304 (combining).

Aaron Miller
  • 9,892
  • U+0304 isexactly what i want. Thank you! – j0h Nov 14 '13 at 04:12
  • @j0h Glad to be of help! – Aaron Miller Nov 14 '13 at 04:17
  • Useful to combine _ with ‾ to make annotations like ̅_|→. On Linux, this can be done by pressing Ctrl+Shift+U, followed by the 4 Unicode characters, followed by the space or enter key and eventually followed by the character you want to combine (https://help.ubuntu.com/stable/ubuntu-help/tips-specialchars.html.en#ctrlshiftu). It worked in software like Geany but may not work in all software. – baptx Dec 23 '20 at 12:50
  • Update: the character you want to combine should be preceding the combining character instead of following it, so it becomes _̅|→ (it will not be displayed correctly for all fonts: https://ask.libreoffice.org/en/question/284076/hide-dotted-circle-when-using-a-combining-character/). – baptx Dec 24 '20 at 15:07
14

You could try a web service to look up the unicode character you want by drawing.

Unicode character recognition

Some results:

Horizontal scan line-3: ⎻
Unicode hexadecimal: 0x23bb

Combining double macron: ͞
Unicode hexadecimal: 0x35e

Upper one eighth block: ▔
Unicode hexadecimal: 0x2594

Combining overline: ̅
Unicode hexadecimal: 0x305

Ivan Chau
  • 1,533
7

How to do an overline?

... ¯\_(ツ)_/¯ ... I don't know.

Joke aside, here is a short way to generate them in code if you need them (you can adapt to any language, here in Python):

print(chr(8254)) # ‾
print(chr(175))  # ¯
Basj
  • 1,809
  • 12
  • 58
  • 100
1

Alt+0175 gives you upper score ¯¯

(Make sure you press and hold Alt while typing the numbers)

Guest
  • 11