notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

Notepad++ RegEx doesn't recognize unicode (Emoji) characters

Open
#10,846 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Description of the Issue

I had a large text file and did a regex search to identify all lines not starting with < (Regexp ^[^<]) and it missed all lines which contained an emoji at the start of the line.

Steps to Reproduce the Issue
  1. Add the lines << 😇 //
  2. Search for RegExp ^[^<]
Expected Behavior

The RegExp should recognize also unicode characters as emojis correctly

Actual Behavior

Look at results (below I searched for ^[^<] and ^[<]; neither matches the emoji line

image

Debug Information

Notepad++ v8.1.9.2 (32-bit)
Build time : Nov 21 2021 - 04:27:12
Path : C:\Program Files (x86)\Office\Notepad++\notepad++.exe
Command Line :
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 (64-bit)
OS Version : 2009
OS Build : 19044.1348
Current ANSI codepage : 1252
Plugins : AnalysePlugin.dll AutoSave.dll ComparePlugin.dll CSVQuery.dll DSpellCheck.dll JSMinNPP.dll LightExplorer.dll LocationNavigate.dll LuaScript.dll mimeTools.dll nppAutoDetectIndent.dll NppBplistPlugin.dll NppMenuSearch.dll NppQCP.dll NppSaveAsAdmin.dll NppTextFX.dll RegexTrainer.dll ReloadButton.dll XmlNavigator.dll XMLTools.dll _CustomizeToolbar.dll

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the problem in Notepad++ using the sample lines and the regular expressions ^[^<] and ^[<]. Start by tracing the regular-expression search path for a line beginning with the supplied emoji. Done means the emoji line is handled correctly by the relevant searches, with regression coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, search
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.