• Login
Community
  • Login

Unicode in shortcuts.xml

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
7 Posts 4 Posters 690 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    Stefan Travis
    last edited by May 31, 2023, 12:15 AM

    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&#x2022; " />
    <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?

    T A 2 Replies Last reply May 31, 2023, 12:34 AM Reply Quote 0
    • T
      Terry R @Stefan Travis
      last edited by May 31, 2023, 12:34 AM

      @Stefan-Travis

      Have you read the FAQ post here?

      Terry

      S 1 Reply Last reply May 31, 2023, 1:00 AM Reply Quote 1
      • S
        Stefan Travis @Terry R
        last edited by Stefan Travis May 31, 2023, 2:05 AM May 31, 2023, 1:00 AM

        @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.

        1 Reply Last reply Reply Quote 0
        • A
          Alan Kilborn @Stefan Travis
          last edited by May 31, 2023, 11:41 AM

          @Stefan-Travis

          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.

          1 Reply Last reply Reply Quote 0
          • W
            wonkawilly
            last edited by May 31, 2023, 5:10 PM

            @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.

            A 1 Reply Last reply May 31, 2023, 5:37 PM Reply Quote 0
            • A
              Alan Kilborn @wonkawilly
              last edited by May 31, 2023, 5:37 PM

              @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.

              W 1 Reply Last reply Jun 1, 2023, 6:27 PM Reply Quote 0
              • W
                wonkawilly @Alan Kilborn
                last edited by Jun 1, 2023, 6:27 PM

                @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&#x2022; "
                to
                "$1• "
                Restart notepad and execute the macro.
                Now the Npp macrosystem supports unicode.

                1 Reply Last reply Reply Quote 1
                2 out of 7
                • First post
                  2/7
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors