• Login
Community
  • Login

UDL Operators - unicode support?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 425 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.
  • M
    moon6969
    last edited by Jun 3, 2020, 11:47 AM

    I’m making a UDL for some UTF-8 files and was hoping to use some unicode [Sm] Symbol, Math for Operators1.

    From Ivan’s UDL operators documentation …

    Operators1
    This is a “forward” search group.
    These operators can be “glued” to other keywords. You can use it to define operators like:
    ! && << >> + - _ %
    In short: these should be special non-alphanumeric characters

    On Notepad++ v7.8.6 (32-bit) I can only get them working with basic ASCII (codepoint < 7F) non-alphanumerics - is there a way around this?

    NB: Same issue appears with Delimiter Open/Close.

    Cheers.

    P 1 Reply Last reply Jun 3, 2020, 1:04 PM Reply Quote 0
    • P
      PeterJones @moon6969
      last edited by Jun 3, 2020, 1:04 PM

      @moon6969 said in UDL Operators - unicode support?:

      I can only get them working with basic ASCII

      I hadn’t tried before today, but I concur

      is there a way around this?

      Natively:

      • for delimiters? no
      • for operators? if you’re willing to use one of the keywords lists for “fancy operators”, you could give it the same (or similar) styling, so those keywords look like the operators

      Using a scripting plugin (like PythonScript)

      • you can add extra highlighting to a UDL language using regexes via the script EnhanceUDLLexer.py that @Ekopalypse shares in this linked post
      M 1 Reply Last reply Jun 3, 2020, 4:39 PM Reply Quote 1
      • M
        moon6969 @PeterJones
        last edited by Jun 3, 2020, 4:39 PM

        @PeterJones Thanks.
        I was hoping to use operators since they “glue” - my initial testing indicates that keywords need spaces to be recognised which is difficult to ensure in my case.

        I’ll check out the suggested script - might be a quick win if it’s fast enough on some of the decrepit hardware I need to support!

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