Skip to content

[BUG] When searching in a file that contains the "NUL" character (U+0000), the string is truncated in the "Search Result Window" #16466

@softmgr

Description

@softmgr

Is there an existing issue for this?

  • I have searched the existing issues

Description of the Issue

When searching in a file that contains the "NUL" character (U+0000), the string is truncated in the "Search Result Window".

test.log.zip

Steps To Reproduce

  1. Open the test.log file. Press Ctrl+F to search, enter Stop as the search term, and click the Find All in Current Document button.
  2. In the Search results window, only the following is shown: Line 1: ****Start recording . All bytes following the NUL character are truncated.

Current Behavior

The search result is truncated at the NUL character, no content after the NUL is displayed.

Expected Behavior

The search result should display the entire matching string exactly as it appears in the editor, including the NUL character.

Debug Information

Notepad++ v8.7.9   (64-bit)
Build time : Mar 26 2025 - 03:20:28
Scintilla/Lexilla included : 5.5.5/5.4.3
Boost Regex included : 1_85
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : 
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : ON
Placeholders : OFF
Scintilla Rendering Mode : SC_TECHNOLOGY_DIRECTWRITE (1)
Multi-instance Mode : monoInst
File Status Auto-Detection : cdEnabledNew (for current file/tab only)
Dark Mode : OFF
OS Name : Windows 10 Pro for Workstations (64-bit)
OS Version : 22H2
OS Build : 19045.5796
Current ANSI codepage : 936
Plugins : 
    mimeTools (3.1)
    NppConverter (4.6)
    NppExport (0.4)

Anything else?

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions