Unicode in shortcuts.xml
-
I’ve been using this code in the shortcuts.xml file to insert a unicode bullet character at the start of a selected paragraph:
<Action type="3" message="1700" wParam="0" lParam="0" sParam="// Insert Point Bullet //" /> <Action type="3" message="1601" wParam="0" lParam="0" sParam="(^.+)" /> <Action type="3" message="1625" wParam="0" lParam="2" sParam="" /> <Action type="3" message="1602" wParam="0" lParam="0" sParam="$1• " /> <Action type="3" message="1702" wParam="0" lParam="642" sParam="" /> <Action type="3" message="1701" wParam="0" lParam="1609" sParam="" />
But after the 8.3.5 update, it inserts the literal text "& # x 2 0 2 2 ; " instead of the characters "• ". Pasting the characters into shortcuts.xml gives a crash, but reverting to 8.3.4 returns to the old behavior.
Presumably the way to reference unicode has changed, so can anyone tell me the new way?
-
-
@Terry-R Thank you - I had missed that.
It seems most of the time we can replace “& # x 0 0 0 A ;” etc with " \ x { 0 0 0 A }" etc, and the old " \ x 0 A" will work too - but not always.
-
But after the 8.3.5 update, it inserts the literal text "& # x 2 0 2 2 ; " instead of the characters "• ". Pasting the characters into shortcuts.xml gives a crash, but reverting to 8.3.4 returns to the old behavior.
Please be accurate in your statements. You mean 8.5.3…and (presumably) 8.5.2 here.
-
@Stefan-Travis said in Unicode in shortcuts.xml:
to insert a unicode bullet character
To insert a unicode bullet character did you already tried to use directly the bullet into the macro instead of its entity? In other words you might want to try to transform the Replace parameter from
"$1• "
to
"$1• "
Restart notepad and execute the macro. -
@wonkawilly said in Unicode in shortcuts.xml:
you might want to try to transform the Replace parameter from
I think the forum changed your first thing from entity notation to the real character. People have been putting spaces between each character to avoid this when posting, reference
& # x 2 0 2 2 ;
usage above. -
@Alan-Kilborn @Stefan-Travis said in Unicode in shortcuts.xml:
to insert a unicode bullet character
think the forum changed your first thing from entity notation to the real character. People have been putting spaces between each character to avoid this when posting, reference & # x 2 0 2 2 ; usage above.Ops… I didn’t notice… than let me reformulate whit corrections:
To insert a unicode bullet character did you already tried to use directly the bullet into the macro instead of its entity? In other words you might want to try to transform the Replace parameter from"$1• "
to
"$1• "
Restart notepad and execute the macro.
Now the Npp macrosystem supports unicode.