notepad++ url processing cyrillic symbols
-
Hi Guy,
thank you for doing and researching this and the confirmation about the test.
But I don’t get the same result for \x205fSo, 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 -
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 -
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 -
I hope these corrections will be made
Cheers
Alexandr -
Please give instructions on how to compile notepadd++ with support url processing cyrillic symbols.
Thanks in advance. -
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
- Install Visual Studio 2015 or VS2017 and the SDK (Software Development Kit)
- Install git software
- Clone the repo from https://github.com/notepad-plus-plus/notepad-plus-plus.git
- Modify the Notepad_plus.h file using Visual Studio
- Follow the instruction to compile npp like given on github page
- Copy the scilexer.dll from an official distribution (otherwise integrity check will fail)
- Cross fingers.
Hope I didn’t forget anything.
Cheers
Claudia -
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? -
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 -
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.