23

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.

4 Answers 4

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

4
  • U+0304 isexactly what i want. Thank you!
    – j0h
    Nov 14, 2013 at 4:12
  • @j0h Glad to be of help! Nov 14, 2013 at 4: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 (help.ubuntu.com/stable/ubuntu-help/…). It worked in software like Geany but may not work in all software.
    – baptx
    Dec 23, 2020 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: ask.libreoffice.org/en/question/284076/…).
    – baptx
    Dec 24, 2020 at 15:07
13

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

1
4

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))  # ¯
0

Alt+0175 gives you upper score ¯¯

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.