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

[BUG] No trimming for NO BREAK SPACE (UTF-8 C2A0)

Open
#13,183 3 comments 0 reactions 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

This character isn't "recognized" by Notepad++, yet you can copy/delete it :

https://en.wikipedia.org/wiki/Non-breaking_space
https://www.fileformat.info/info/unicode/char/c2a0/index.htm
https://www.scivision.dev/hex-code-c2a0-non-breaking-space-markdown/

Steps to Reproduce the Issue
  1. Enter the "no break space" \x{00A0} character into a UTF-8 file : Alt+0160 (Windows)
  2. Try displaying the "spaces" (horizontal indentation)
  3. Try trimming the "no break space"
Expected Behavior
  1. "no break space" should be treated like any other "spaces" (horizontal indentation)
Actual Behavior
  1. "no break space" is resilient to trimming, but can be edited/deleted manually
Debug Information

https://github.com/notepad-plus-plus/notepad-plus-plus/issues/5783

https://github.com/notepad-plus-plus/notepad-plus-plus/issues/6213

Regards

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

Start by reproducing the issue in a UTF-8 file: insert U+00A0, display spaces, and try trimming it. Compare the behavior with ordinary spaces and review the related issues #5783 and #6213; done means the non-breaking space is displayed and handled by trimming like other horizontal spaces.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.