notepad-plus-plus / notepad-plus-plus/notepad-plus-plus
[BUG] Wrong file length in the statusbar
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
After selecting proper 1-byte codepage in the menu the internal representation of data becomes unicoded. So the displayed length now is x2 times greater than it is.
It also breaks the HEX plugin, now it displays bullshit instead of raw file data.
Related: #16468 #15919
Steps To Reproduce
- Open 1-byte txt
- Select another 1-byte codepage.
- See wrong length - now it's unicoded internally
Current Behavior
Length doubled
Expected Behavior
Correct length
Debug Information
Notepad++ v8.8.1 (64-bit)
Build time : May 3 2025 - 18:41:09
Scintilla/Lexilla included : 5.5.6/5.4.4
Boost Regex included : 1_85
Path : C:\Program Files\Notepad++\notepad++.exe
Command Line : "C:\Program Files\Notepad++\change.log"
Admin mode : OFF
Local Conf mode : OFF
Cloud Config : OFF
Periodic Backup : OFF
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 7 Professional (64-bit)
OS Build : 7601.0
Current ANSI codepage : 1251
Plugins :
BigFiles (0.1.3)
ComparePlugin (2.0.2)
helloworld (1)
HexEditor (0.9.12)
JSMinNPP (1.2205)
MarkdownViewerPlusPlus (0.8.2)
mimeTools (3.1)
NppConverter (4.6)
nppcrypt (1.0.1.6)
NppExport (0.4)
NppFTP (0.29.9)
NppQrCode64 (0.0.0.1)
ShtirlitzNppPlugin (1.1.2)
XMLTools (3.1.1.13)
Anything else?
No response
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
No source files or tests are named. Reproduce the problem in Notepad++ v8.8.1 by opening a 1-byte text file and selecting another 1-byte codepage, then trace the statusbar length and HEX plugin data handling. Done means the displayed length remains correct and raw file data is preserved after the codepage change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100