5

I’m trying to type some Unicode characters that contain letters. I am using Windows 7 but the issue also appears in Windows 8. An example is 🎻 (U+1F3BB). I can’t type it though because Firefox and every other program I try to type them in has Alt+F or Alt+B as a shortcut for something else.

Is there anyway I can work around these shortcuts? I’ve tried Alt+Shift+(code) and editing the registry.

8
  • Did it, I'm using win 7 right now but it also doesn't work on Win 8
    – Rizada
    Jan 15, 2015 at 3:38
  • Which method are you using to type characters by their Unicode numbers? Most methods don’t work for characters beyond the BMP, i.e. with numbers > FFFF. Jan 15, 2015 at 3:51
  • I just hold down alt and then enter the code, I've also tried using the actual + sign and using alt and shift
    – Rizada
    Jan 15, 2015 at 3:53
  • What can you type using that method? Unless there is some special software installed, <kbd>Alt</kbd> works with decimal numbers and only up to 255 and only when using num keypad. Jan 15, 2015 at 4:00
  • Yes, any code that doesn't have any letters works fine. It's just that key short cuts interrupt typing when ever I try to type a letter.
    – Rizada
    Jan 15, 2015 at 4:03

3 Answers 3

3

The input method you seem to be using is the “universal” method on the Fileformat.info page How to enter Unicode characters in Microsoft Windows: press down Alt, enter + using the num keypad key, type the Unicode number in hexadecimal digits, release the Alt. Though very useful, the method isn’t really universal. First, it requires a Windows registry setting, which is usually off by default; but you have apparently this setting OK. Second, typing a character with Alt pressed down may get handled by the software you are using. Apparently in your version of Firefox, AltF gets handled by the browser. But even if you could fix this, it would not help you to enter U+1F3BB. The reason is the third essential limitation of the “universal” method: it works only up to U+FFFF, i.e. for characters in the Basic Multilingual Plane (BMP). Many new icon-like characters have been allocated outside the BMP.

Regarding the clash with shortcut assignments, it seems that using the Shift key together with the Alt key solves the problem. That is, press both Shift and Alt down when starting and keep them both pressed down until you have typed the hex digits. Tested in Firefox 84 in Win 10. Also works in Chrome

The BMP restriction is exemplified by the observation in comments: trying to enter U+10400 using the method results in Ѐ, which is Cyrillic letter Е with grave, U+0400. So when you typed 10400 in trying to use the method, the leading 1 was ignored. (In other words, the hex number entered was taken modulo 10000 hex.)

However, as phuclv’s answer tells, you can enter a non-BMP character as a surrogate pair. You would need to consult resources like Fileformat.info to find out the surrogate values (or tediously compute them).

For typing non-BMP characters, copy and paste is often the most practical way. Of course, you first need something to copy; you could use online tables of characters, or my Full Unicode Input utility, or the character picker in Microsoft Word (which extends past BMP, unlike the Windows character picker, i.e. CharMap).

1
  • there is no built-in way for typing non-BMP characters you can actually type non-BMP characters with Alt codes, although with a little quirk
    – phuclv
    Mar 19, 2021 at 11:11
4

As mentioned in the other answer, you must press numpad + after Alt if you want to enter characters with hex values. Typically in that case the Alt+letter will be blocked from activating the menu in most apps. However Firefox and some others may choose to capture keyboard events differently so the behavior will be different. See How to prevent Firefox keyboard shortcuts from interfering with Unicode input?

For non-BMP characters you need to type using surrogate pairs because Windows always uses UTF-16. For example U+1F3BB is represented in UTF-16 as U+D83C U+DFBB, so you must type it as Alt++D83C then Alt++DFBB. You can use tools like https://r12a.github.io/app-conversion/ to get the surrogate pair. Or use PowerShell

PS /home> $c = [char]::ConvertFromUtf32(0x1F3BB)
PS /home> "U+{0:X4} U+{1:X4}" -f [uint]$c[0], [uint]$c[1]
U+D83C U+DFBB

That said, there are other built-in ways to enter any Unicode characters in Windows, even ones outside the BMP

  • Use the JavaScript copy function to copy the desired characters to clipboard directly from the browser. It works in most modern browsers like Firefox or Chrome/Chromium

    copy("\u25A0")    // only applicable for characters in the BMP (⩽ U+FFFF)
    copy("\u{1F3BB}") // applicable for all characters (U+0000 to U+10FFFF)
    copy(String.fromCodePoint(0x1F3BB))
    
  • Open Wordpad, enter the hex code point value (like 1F3BB) with an optional U+ prefix and press Alt+X. This shortcut also works in MS Word and Libre Office

  • Use PowerShell and type the character directly, or copy it to clipboard

    scb "`u{1F3BB}"                                   # or
    Set-Clipboard "`u{1F3BB}"                         # or
    [char]::ConvertFromUtf32(0x1F3BB) | Set-Clipboard # or
    [char]::ConvertFromUtf32(0x1F3BB) | scb           # or
    [char]0x1F3BB | Set-Clipboard
    

    Another alternative:

    [char]::ConvertFromUtf32(0x1F3BB) | clip
    "`u{1F3BB}" | clip
    

    For older versions of PowerShell you'll need

    Add-Type -AssemblyName System.Windows.Forms
    [Windows.Forms.Clipboard]::SetText("`u{1F3BB}") # or
    [Windows.Forms.Clipboard]::SetText([char]::ConvertFromUtf32(0x1F3BB))
    

    After this paste the character anywhere you want

There are also other ways in Windows without any 3rd party tools, like typing or copying with VBS or Js but they're clunkier

That said, most of the time you should use the emoji panel instead. This works for emojis and lots of common symbols and is very quick and easy to use. There's no need to remember the Unicode code points anymore. Just press Windows+. (period) or Windows+; (semicolon) and type to search

Windows emoji panel

See How do I bring up the emoji IME on Windows 10?

-1

We can avoid the hassle of typing hexadecimal characters altogether by converting them to its decimal value. Many online converters are available for it like this. After that we can press alt + decimal value.

e.g. 25CF when converted to decimal value gives 9679 which when pressed with alt gives ●. Always remember to use the num pad while pressing the numeric digits.

1

You must log in to answer this question.

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