I defined some hotstrings containing characters from the Unicode Supplemental Multilingual Plane (SMP). Those work nicely (thanks to
trismarck's UTF-16 surrogate tip in some applications, but unfortunately not in Notepad++. There, the following code
Code: Select all
SendMode Input ; It doesn't help to use Event or Play.
#SingleInstance force
; Display bike
MsgBox, % chr(0xD83D)chr(0xDEB2)
#Hotstring b0 r
::bike0::x ; <-- the "x" stands for the bike character, which is unsupported in this forum.
#Hotstring b0 r0
::bike1::{U+1F6B2}
::bike2::{U+D83D}{U+DEB2}
#b::Send, {U+D83D}{U+DEB2}
creates the following output after entering "
bike0 bike1 bike2 #b":
, where Ⓐ and Ⓑ stand for
{U+D83D}{U+DC00} and
{U+DAB2}{U+DC00}, respectively. (I only had to replace the characters here since they are not supported in this forum.) In other words, bike1 and bike2 seem to insert the four surrogates
{U+D83D}{U+DC00}{U+DAB2}{U+DC00}, rather than just the two that are defined. This appears to be caused by
Issue #801: UNICODE-support broken for characters outside the BMP. Is there a way around it? The funny thing is that Notepad++ can do a lot with SMP characters: The bike that I pasted per clipboard after ::bike0:: displays nicely and stays when I save and reopen the file.