You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Question: How to add digraph for '🙂' character? I was trying to have ':)'
I think this is a 4-byte unicode character.
Is it possible to have digraphs for 4-byte unicode?
Environment
Emacs version: 27.1
Operating System: Debian 11
Evil version: 1.15.0
Evil installation type: MELPA
Graphical/Terminal: X
Tested in a make emacs session (see CONTRIBUTING.md): No
Reproduction steps
Add this to init file:
((?: ?\)) . ?\xd83dde42)
Expected behavior
Digraph should be loaded
Actual behavior
Error message: error: Hex character out of range: \xd83dde42...
Further notes
Not sure if I got the unicode hex for '🙂' wrong..
The text was updated successfully, but these errors were encountered:
ju-sh
changed the title
evil-digraph: Add digraph for '🙂' character
evil-digraph: How to add a digraph for '🙂' character
Dec 25, 2024
In short, they were looking at the UTF-16 “surrogate pair” rather than the single Unicode code point.
Single Code Point
The “slightly smiling face” emoji is U+1F642 in Unicode.
UTF-16 Surrogate Pair
In UTF-16 encoding, characters outside the Basic Multilingual Plane (BMP) need two 16-bit code units.
For 🙂, the surrogate pair is 0xD83D 0xDE42.
So, when someone says “it’s U+d83dde42,” they are simply combining the two surrogate halves into one notation (D83D and DE42). It’s still the same emoji, but shown in UTF-16 rather than the single Unicode point in hex.
Issue type
I think this is a 4-byte unicode character.
Is it possible to have digraphs for 4-byte unicode?
Environment
Emacs version: 27.1
Operating System: Debian 11
Evil version: 1.15.0
Evil installation type: MELPA
Graphical/Terminal: X
Tested in a
make emacs
session (see CONTRIBUTING.md): NoReproduction steps
Add this to init file:
Expected behavior
Digraph should be loaded
Actual behavior
Error message:
error: Hex character out of range: \xd83dde42...
Further notes
Not sure if I got the unicode hex for '🙂' wrong..
The text was updated successfully, but these errors were encountered: