notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
Regular expression switches don't recognize non-latin text
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 29.4k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
Description
Npp regex switched don't work on non-latin texts it.
Description of the Issue
I'm trying to change character case in some cyrillic texts using Find&Replace and regular expressions. Unfortunatelly Npp understands \L\l\U\u switches only on latin characters. All other unicode characters are ignored, and there is not way to tell Npp how to handle them properly.
Steps to Reproduce the Issue
- Type some non-latin text in upper-case (i.e. ФЫВА ОЛДЖ)
- Open Replace dialog (Ctrl+H)
- Find what: (\w+)
- Replace with: \L$1
- Select "Regular expressions" option.
- Click "Replace All"
Expected Behavior
Text to be replaced with lower-case version (i.e. фыва олдж)
Actual Behavior
Text remains upper-case (i.e. ФЫВА ОЛДЖ)
Debug Information
Notepad++ v7.3 (32-bit)
Build time : Jan 1 2017 - 20:04:42
Path : C:\Notepad++\notepad++.exe
Admin mode : OFF
Local Conf mode : ON
OS : Windows 10
Plugins : mimeTools.dll NppConverter.dll NppExport.dll NppSharp.dll PluginManager.dll
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue through the Find & Replace dialog using the listed Cyrillic text, regular-expression mode, and the replacement \L$1. Trace the regular-expression replacement handling and verify that Replace All converts non-Latin Unicode characters to lowercase while preserving the existing Latin behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100