Replaces the hexadecimal string under the cursor with the unicode surrogate pair.
Load the function with M-x load-file
and then provide the surrogate-pair.el
source code to Emacs to load it.
Move the cursor over the hex code (like in the section below) and type
M-x surrogate-pair
to call that function.
This should replace the code with the surrogate pair codes.
1D552 (𝕒)
\uD835\uDD52 (𝕒)
I used this example by Xah Lee as a starting point:
http://ergoemacs.org/emacs/elisp_converting_hex_decimal.html
The idea for this helper came when I had to calculate a lot of surrogate pairs, first using the online calculator by Russell Cottrell from
http://www.russellcottrell.com/greek/utilities/SurrogatePairCalculator.htm
and later the information provided there to implement it.
I moved this project to GitLab.
Kudos to GitHub for their ground-breaking work.