Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Version 1.0, 20 August 2021

Version history:

1.0, 20 August 2021

What are ‘hexadecimal’ codes?

Characters are often designated by their Unicode hexadecimal value, usually in the form ‘Unotation ‘U+nnnn’ (or ‘UU+nnnnn’, depending on the length of the number). In this notation, ‘n’ represents a digit. In decimal (‘base-10’) notation, digits range from 0 to 9 (0123456789); in hexadecimal or ‘base-16’ notation, digits range from 0 to F (0123456789ABCDEF). In ‘hex’, you count 0 1 2 3 4 5 6 7 8 9 A B C D E F and then 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 – etc.
In hexadecimal numbers, it does not matter if you use capital letters A-F or lowercase a-f, or even a mix of capital and lowercase.

...

Each character in the Unicode Standard is designated by one unique hexadecimal number. To mark a hexadecimal number as a ‘Unicode hexadecimal scalar value’, to give it its formal name, we prefix the hex number by ‘U+’. So the character ‘Latin small letter a’ Unicode character a (‘LATIN SMALL LETTER A’) is U+0061. Unicode hexadecimal scalar values are at least four digits long, and five-digit ones are also used regularly in Brill publications: for instance, U+10000 designates LINEAR B SYLLABLE B008 A: 𐀀 (Image Removed)1D510 designates 𝔐 (‘MATHEMATICAL FRAKTUR CAPITAL M’), a symbol often used to indicate the Masoretic text of the Hebrew bible.

How do I use these hex numbers to input characters?

You may have to insert a character, and you have no idea how to do that by just typing it using the keyboard. Supposing you saw the character ă mentioned in the ‘Brill Typeface Character List’, which shows the associated hex code 0103 next to it, how do you use that code?

MS Word on MS Windows

MS Word (Windows version only, not the macOS version) has a keyboard command to convert any Unicode hexadecimal scalar value to the associated character.

With the insertion point positioned at the end of the hexadecimal number, press Alt XThe code is converted to the character. (This works as a toggle: press Alt X again and the code reappears.)

Image Added

Image Added

This ‘Alt X trick’ in MS Word also works with hex numbers consisting of five or more digits:

Image Added

Image Added

Note that outside of MS Word, this Alt X trick only works reliably in MS Outlook, not in other applications, at least AFAIK.

Any macOS text application

macOS provides a system-wide Unicode Hex Input mechanism, which therefore works not just in MS Word but in any application that accepts text.

This keyboard layout is pre-installed, but it is not active by default and therefore you won’t see it, so you have to ‘activate’ it (only once).

Activate Unicode Hex Input in macOS

Image Added

Go to System Preferences…
and click Keyboard to select your keyboard options


Image Added

In the Keyboard options, under the Keyboard tab,
checkmark ‘Show keyboard and emoji viewers
in menu bar


Image Added

Under the Input Sources tab,
1) checkmark ‘Show Input menu in menu bar’;
2) click on the + button to activate the new
Input Unicode Hex keyboard layout
(see next screen shot)


Image Added

The dropdown menu allows you to activate a new
keyboard layout (in addition to the one you
already had active):
3) start keying the name of the new keyboard layout
you wish to activate (Unicode Hex Input);
4) when ‘Unicode Hex Input’ appears selected
in the right-hand pane, click ‘Add


Image Added

In your menu bar, near the right, you now see
that you have two active keyboard layouts:
one is your primary keyboard layout (in this case
‘ABC’, a Latin-script keyboard associated
with the English language),
and the other is Unicode Hex Input,
which you can now select and use.

Note also that you now have access to two new items:
‘Show Emoji & Symbols’, a bit of a misnomer since it
in fact gives you access to all of Unicode;
and ‘Show Keyboard Viewer’, which is self-explanatory.


Use Unicode Hex Input in macOS

1) Select Unicode Hex Input in the keyboard menu in the menu bar. It can be used in any application that accepts text.

2) Once selected, you can just type Latin characters as usual. Unicode Hex Input provides basic Latin text input as you would expect. The interesting part is inputting four-digit hexadecimal Unicode scalar values.
To do this, keep the ⌥ Option key depressed (sometimes called the Alt key), and type the four hexadecimal digits of the Unicode character you wish to insert. When it appears you can let go of the Option key.


3) Unicode Hex Input is limited to inputting four-digit Unicode hex codes. But there is another way to access higher-value Unicode hex codes.

Use the Character Viewer (‘Show Emoji & Symbols’) to access 5- or higher-digit Unicode hex codes

The macOS palette commonly known as ‘Show Emoji & Symbols’, also known as the Character Viewer, gives users access to Unicode hex codes longer than 4 digits, the limit of Unicode Hex Input.

Image Added

Choosing ‘Show Emoji & Symbols’ in the keyboard menu brings up the Character Viewer palette, which gives you access to all of Unicode on macOS.

Image Added

When first opened, the palette shows a limited list of character categories, and it defaults to ‘Smileys & People’ emoji. Serious users of text will want to customise the list of character categories by clicking on the ⚙ (‘gear’) dropdown menu.

Note that you could also just key any Unicode hex scalar value in the ‘Search’ box, hit Return, and directly go to the character that is sought.

Image Added

Scroll in the list of character categories to select the ones that you want to appear by default, and deselect unwanted others.

Image Added

At the bottom of the list come the Code Tables. Clicking on the triangle will reveal several encodings, the first and most important of which is ‘Unicode’. Checkmark that.

Image Added

In the left-hand column you can now directly select ‘Unicode’, and in the middle column the top pane lets you scroll down all Unicode ranges.

The middle bottom pane shows the contents of the Unicode range selected in the top middle pane. In this case, it is the first Unicode range that has five-digit hexadecimal scalar values, which you could not access by using the Unicode Hex Input.

Double-clicking any character will insert that character at the insertion point in any text application that is active (= whose window is topmost next to the Character Viewer palette).

You can drag column/pane boundaries to enlarge any panes that need it, for instance the middle bottom pane with all the characters.

Image Added

You could scroll down all the way to 0002B820 to get to the Unicode range ‘CJK Unified Ideographs Ext. E’, and then scroll down in the bottom middle pane to search for a character you might need, e.g. U+2CC5F.

But you could also just key ‘2cc5f’ in the ‘Search’ box to quickly access the character you need.

BTW, the ‘Search’ box also accepts (parts of) Unicode character names, so that is also a very useful method of finding a character, maybe when you know its name but not its code.