Community
    • Login

    notepad++ url processing cyrillic symbols

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    29 Posts 4 Posters 20.9k 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.
    • Claudia FrankC
      Claudia Frank
      last edited by

      Hi Guy,

      thank you for doing and researching this and the confirmation about the test.
      But I don’t get the same result for \x205f

      So, as you see I used python script to add the char

      editor.appendText('a'+unichr(0x205f)+'z')
      

      and it looks like it matched as well.

      In regards to the time regex option, take your time, you don’t even have to waste your time doing it - if you find it useful, use it, otherwise chuck it into the bin. ;-)

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • Александр КорженевскийА
        Александр Корженевский
        last edited by

        Please explain what I need to do with the regexp
        For notepad++ processing with Cyrillic characters in the url?
        https://lh3.googleusercontent.com/-Rcx51vbIw0U/WGphx4PJ_MI/AAAAAAAAEV0/znXcaeFVKZE/s0/screenshot%25202017-01-02%2520001.jpg
        thanks in advance.
        sorry for the stupid question.
        smile

        Claudia FrankC 1 Reply Last reply Reply Quote 0
        • Claudia FrankC
          Claudia Frank @Александр Корженевский
          last edited by

          @Александр-Корженевский

          You can’t do anything. It was just a discussion for a probably new regex between guy038 and me.
          There has been an issue addressed at github and now it is up to Don to decide if it gets changed or not.
          Or if you familiar with C/C++ and using Visual Studio you could compile npp yourself with the changed regex.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • Александр КорженевскийА
            Александр Корженевский
            last edited by

            I hope these corrections will be made
            Cheers
            Alexandr

            1 Reply Last reply Reply Quote 0
            • Александр КорженевскийА
              Александр Корженевский
              last edited by Александр Корженевский

              Please give instructions on how to compile notepadd++ with support url processing cyrillic symbols.
              Thanks in advance.

              Claudia FrankC 1 Reply Last reply Reply Quote 0
              • Claudia FrankC
                Claudia Frank @Александр Корженевский
                last edited by

                @Александр-Корженевский

                Here is described how to build notepad++. Please use Visual Studio 2015 or 2017 as there was a commit that this has been changed lately.
                In …\notepad-plus-plus\PowerEditor\src\Notepad_plus.h source file you need to replace

                #define URL_REG_EXPR "[A-Za-z]+://[A-Za-z0-9_\\-\\+~.:?&@=/%#,;\\{\\}\\(\\)\\[\\]\\|\\*\\!\\\\]+"
                

                with a different regex, like the one from here. Make sure you do proper escaping.

                So the steps needed are

                1. Install Visual Studio 2015 or VS2017 and the SDK (Software Development Kit)
                2. Install git software
                3. Clone the repo from https://github.com/notepad-plus-plus/notepad-plus-plus.git
                4. Modify the Notepad_plus.h file using Visual Studio
                5. Follow the instruction to compile npp like given on github page
                6. Copy the scilexer.dll from an official distribution (otherwise integrity check will fail)
                7. Cross fingers.

                Hope I didn’t forget anything.

                Cheers
                Claudia

                1 Reply Last reply Reply Quote 0
                • Александр КорженевскийА
                  Александр Корженевский
                  last edited by

                  Please tell me the correct line ready for replacement.
                  For Notepad to accept Russian characters in the url.
                  Sorry for the stupid question. smile
                  Why the creators can’t add fixes to the code for all?

                  Claudia FrankC 1 Reply Last reply Reply Quote 0
                  • Claudia FrankC
                    Claudia Frank @Александр Корженевский
                    last edited by

                    @Александр-Корженевский

                    file Notepad_plus.h and change the following line

                    //#define URL_REG_EXPR "[A-Za-z]+://[A-Za-z0-9_\\-\\+~.:?&@=/%#,;\\{\\}\\(\\)\\[\\]\\|\\*\\!\\\\]+"
                    #define URL_REG_EXPR "(?-s)[A-Za-z][A-Za-z0-9+.-]+://[^\\s]+?(?=\\s|\\z)"
                    

                    Why the creators can’t add fixes to the code for all?

                    It is still an issue only so as long as no one makes a proper pull request there
                    is little chance that it gets implemented. Unfortunately, my working agreements
                    do not allow me to share code on github, sourceforge …, so I can’t do, it at least
                    for the moment.

                    Cheers
                    Claudia

                    1 Reply Last reply Reply Quote 0
                    • Александр КорженевскийА
                      Александр Корженевский
                      last edited by

                      Maybe the developers can make a correction?
                      What about to move definition of this regexp to config file?
                      That anybody, who need to, can change it without recompilation!
                      And update FAQ how to add support of national symbols to url recognation
                      I very much hope that correction will be made.

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