5

Sometimes I want to type Unicode characters (em-dash, quotes, Greek letters sometimes, superscripts etc). It can be done using character codes, but then one needs to look up / memorize them, which is… tiresome.

Is there a way to enter characters by names in Windows?

Japanese IME has something like this ― e.g. hoshi (Japanese for «star») converts to «☆» ― but for a very limited subset of Unicode.

1
  • Ideally, a solution would offer (fuzzy) search and be usable without a mouse.
    – jan-glx
    Sep 20, 2021 at 13:31

8 Answers 8

5

Unicode Input by Name more or less solves the problem.

1
  • 1
    While not updated for 11 years, it still works! (For non-emoji only & a bit awkward to use since it requires CTRL+v to insert the selected character)
    – jan-glx
    Sep 20, 2021 at 13:35
4
+50

You can try uniqoda. It has a search box where you can type the character you are looking for by name. Last updated in January 2022.

Or try All the Unicode can be installed from Microsoft Store. Last updated in 2017

Overview of all available Unicode characters, including Emojis. Convert selected characters to a required format (for developers) or copy characters to the clipboard. Navigate from the overview of all Unicode ranges to the characters. In more than 54,000 characters, find the desired one by entering a search word.

Try BabelMap (Unicode Character Map for Windows). Seems more current and updated with the lastest emojis. Last updated September 2021 (at the time of writing this answer).

BabelMap is a free character map application for Windows that allows you to browse through the entire Unicode character repertoire of nearly 144,000 characters, or search for a particular character by name or by code point. Characters can then be copied to the clipboard for use in any Unicode-aware application.

2
  • 3
    uniqoda works like a charm, maybe we can convince @yakov-galka to update it and fix #7
    – jan-glx
    Sep 20, 2021 at 14:30
  • 2
    @jan-glx I implemented #7 and released uniqoda-v6. HTH Jan 4, 2022 at 6:41
2

If you need to work with all characters include the ones outside the BMP (i.e. code points above U+FFFF), or you want the latest Unicode version then skip this and check the more complete version below in the next section

Otherwise the below PowerShell script can be used which doesn't need any external resources because it uses the available getuname.dll in System32

$GetUNameDef = @'
[DllImport("C:/Windows/system32/getuname.dll")]
public static extern int GetUName(
    UInt16 wCharCode,
    [MarshalAs(UnmanagedType.LPWStr)] System.Text.StringBuilder lpbuf);
'@
$un = Add-Type -MemberDefinition $GetUNameDef -Name "GetName" `
    -PassThru -Namespace Runtime.InteropServices
$name = [Text.StringBuilder]::new(1024)

function Select-Char([string]$pattern) {
    1..0xFFFF | ForEach-Object { if ($un::GetUName($_, $name) -gt 0) {
        $charName = $name.ToString()
        if ($charName -like "*$pattern*") {
            [PsCustomObject]@{
                Character = [char]$_
                Designation = "U+{0:X4}" -f $_
                Name = $charName
            }
        }
    } }
}

After that you can call Select-Char "pattern" and copy the desired character

Example output:

PS D:\> Select-Char "dash" | Select-Object -First 4
Character Designation Name
--------- ----------- ----
        ‒ U+2012      Figure Dash
        – U+2013      En Dash
        — U+2014      Em Dash
        ⁓ U+2053      Swung Dash
PS D:\> Select-Char "alpha" | select -First 6
Character Designation Name
--------- ----------- ----
        ɑ U+0251      Latin Small Letter Alpha
        ɒ U+0252      Latin Small Letter Turned Alpha
        Ά U+0386      Greek Capital Letter Alpha With Tonos
        Α U+0391      Greek Capital Letter Alpha
        ά U+03AC      Greek Small Letter Alpha With Tonos
        α U+03B1      Greek Small Letter Alpha

You can also pipe the output to Out-GridView to get a filterable GUI, for example Select-Char 'arrow' | Out-GridView. Sample output:

Out-GridView sample output

I don't know which Unicode version getuname.dll uses though. Also note that there are many limitations of this:

  • The output isn't sorted by usage frequency (which requires a much more complex solution that may need to run as a service)
  • It doesn't work for non-English terms like the Windows emoji picker (Looking for chaise won't work even if you're in French locale)
  • It doesn't do fuzzy matching or word conjugation like many modern smart emoji pickers or IMEs
  • Some characters might just look as junks because there's no available font for them, but copying them then paste elsewhere still works perfectly

If you need a more complete solution then first you need to download the latest official Unicode database UnicodeData.txt. After that you can use the following PowerShell function

function Select-AllUniChar([string]$pattern) {
    (Select-String $pattern .\UnicodeData.txt | ForEach-Object {
        $codepoint = [uint32]"0x$($_.Line.Substring(0, $_.Line.IndexOf(';')))"
        [char]::ConvertFromUtf32($codepoint)
    } ) -join ', '
}

Demo:

D:\> Select-AllUniChar "gamma"
Ɣ, ɣ, ɤ, ˠ, Ͷ, ͷ, Γ, γ, Ϝ, ϝ, ᴦ, ᵞ, ᵧ, ℽ, ℾ, Ⲅ, ⲅ, 𝚪, 𝛄, 𝛤, 𝛾, 𝜞, 𝜸, 𝝘, 𝝲, 𝞒, 𝞬, 𝟊, 𝟋

This works for all Unicode characters but it still has the same limitations listed above, and it still won't work for many characters that are combined from multiple code points like these

🏃🏻‍♀️🐱‍😶‍ 🇻🇳🇺🇸🇬🇧🇯🇵🇩🇪🇫🇷🇪🇺🇺🇳⚑🏴‍☠️⚧🏳️‍⚧️🏩💓👨‍❤️‍👨👩🏼‍❤️‍👨🏽👩🏻‍❤️‍💋‍👩🏿👩‍👩‍👦‍👦👨‍👩‍👦‍👦🏳️‍🌈👧🏻🤵🏻

Most of them are emojis and the script can be modified to look also in the emoji database from the Unicode Consortium. But some are really proprietary emojis from some vendors so they aren't available on all platforms and obviously not on the official Unicode database

You can also change the script to print more information

function Select-UniChar([string]$pattern) {
    $textInfo = [cultureinfo]::GetCultureInfo('en-US').TextInfo
    
    Select-String $pattern .\UnicodeData.txt | ForEach-Object {
        $pos1 = $_.Line.IndexOf(';')
        $codepoint = [uint32]"0x$($_.Line.Substring(0, $pos1))"
        $pos2 = $_.Line.IndexOf(';', $pos1 + 1)
        $name = $_.Line.Substring($pos1 + 1, $pos2 - $pos1 - 1).ToLower()
        [PsCustomObject]@{
            Character = [char]::ConvertFromUtf32($codepoint)
            Designation = "U+" + $codepoint
            Name = $textInfo.ToTitleCase($name)
        }
    }
}

Sample output:

PS D:\> Select-UniChar "cross.*mark|check" | Select-Object -First 8

Character Designation Name
--------- ----------- ----
⍻         U+9083      Not Check Mark
⑇         U+9287      Ocr Amount Of Check
☑         U+9745      Ballot Box With Check
✅         U+9989      White Heavy Check Mark
✓         U+10003     Check Mark
✔         U+10004     Heavy Check Mark
❌         U+10060     Cross Mark
❎         U+10062     Negative Squared Cross Mark
1
  • +1 for background information
    – jan-glx
    Sep 25, 2021 at 15:21
1

Is there a way to enter characters by names in Windows but for a very limited subset of Unicode?

Yes, in fact your qualification makes it a perfect candidate for hotstrings.

You can get a copy of AutoHotkey (even the portable version is sufficient) and use it to run a simple script making use of hotstrings that you can create and tailor to your needs. For example:

::hoshi::☆ ; Automatically replace “hoshi” with a star glyph
           ; or
::星::☆    ; Automatically replace the Kanji character for start with a star


; Some more examples
::hōshasei::☢
::egao::☺
::taiyō::☼
::hurumaisu::♿
::wataru::☦
1
  • I think you misread (and misquoted) the question. We are looking for a un-( or less) limited solution here; one that doesn't require the user to memorize codes (numbers or letters, i.e. offers search)
    – jan-glx
    Sep 20, 2021 at 13:29
0

I can't swear to it, but I think BabelPad might have a feature like this. If you're using Windows and don't mind limiting yourself to this particular editor (I think you wanted a more general solution), this could work for you.

0

I don't know of any tool that converts character names to characters on Windows but there are some tools that use AltGr or digraphs

See ЮNICODE Keyboard Enhancer

Key mapping

gVim has many Unicode digraphs for editing UTF-8 files

I can imagine extending UnicodeInput to do what you want.

You might be able to use a commercial text expander such as fastfox or Shortcut but use a single character as the expansion instead of a phrase.

1
  • Not quite what I want, indeed, but interesting, thanks.
    – Grigory M
    May 21, 2011 at 5:28
0

The oldest and the simplest solution is to use the Windows utility of Character Map, which is built into Windows since decades ago.

Character Map can search for symbols in a font based on their Unicode names, and will also search the names by partial strings. Once found, characters can be selected and copied to the clipboard. This requires the option of "Advanced view" to be checked.

Below is the search for "beta" in Arial:

enter image description here

2
  • 1
    Windows, "ch", return, alt+e , "beta", return, tab tab tab, right arrow, return, alt+c, alt+f4, ctrl+v - ezey! 😂 also: no emoji (at least with arial)
    – jan-glx
    Sep 22, 2021 at 7:45
  • You need a font that contains emojis. But you now have in Windows the Win+, (Winkey+dot) for emojis.
    – harrymc
    Sep 22, 2021 at 8:02
-1

There are programs such as http://www.autohotkey.com/ which allow you to configure your own hotkeys. You could, in theory, create a VBS script (and assign a hotkey to it) which pops up a dialog where you type an alias and it will place the correct char code into the clipboard, which you then paste. You could create your own short list and add to it as you look up a new character code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .