Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Find All behaves incorrectly when searching for non-Latin text in long lines #8034

Closed
d0vgan opened this issue Mar 12, 2020 · 3 comments

Comments

@d0vgan
Copy link
Contributor

d0vgan commented Mar 12, 2020

Description of the Issue

I’ve just tried Notepad++ 7.8.5 32-bit with several Cyrillic text files, then tried Notepad++ 7.6.6 32-bit with the same text files - and came to the following conclusion:
the searching (Find All) in non-Latin ANSI text files with long lines (longer than 600 characters) was always broken!

Steps to Reproduce the Issue

  1. Have several ANSI files with non-Latin characters (I tried Cyrillic text files with Windows-1251 encoding) and long lines (more than 600 characters)
  2. Open these files in Notepad++
  3. Search for some non-Latin word using either “Find All in All Opened Documents” or “Find All in Current Document”
  4. Once a matching word is found in a line that is more than 600 characters long, there are two defects:
  • Notepad++ is not able to show this line in the Search Results correctly: this line is either unexpectedly truncated (without the trailing “…”) or is ended with a square (unreadable) symbol;
  • Notepad++ does not jump to the matching word when double-clicking this line in the Search Results (well, sometimes Notepad++ succeeds with it - when the matching word is near the beginning of the line; but it does not succeed when the matching word is closer to the end of the line).

Two sample files attached: one uses Windows-1251 (ANSI) encoding, another one is UTF-8.
test-ANSI.txt
test-UTF8.txt

Try to search for different Cyrillic words inside these files.
Depending on the system locale, you will be able to reproduce this bug either with the ANSI file or with the UTF-8 file.
I was able to reproduce it while searching for a text "может" and "гов".

@d0vgan
Copy link
Contributor Author

d0vgan commented Mar 12, 2020

This issue reflects the original topic in the Notepad++ forum:
https://community.notepad-plus-plus.org/topic/19038/seems-to-be-a-bug-in-the-find-all-functionality

@sasumner
Copy link
Contributor

@d0vgan

There was a change introduced in N++ 7.9.1 from PR #9014 that probably impacts this issue in a positive manner.

Can you try reproducing this issue with 7.9.2 and report your results?
I just tried and I could not reproduce it.
BTW, the two text strings you specified at the end of your issue were not even found in the "ansi" file -- is that correct?

@d0vgan
Copy link
Contributor Author

d0vgan commented Jan 11, 2021

Thank you for reminding me of this issue - I've tested it and indeed, it seems to be resolved in Notepad++ 7.9.1.
As for searching in the "ansi" file, I suppose it succeeds when Russian or Ukrainian is specified in system's regional settings as the language for non-Unicode programs.

@d0vgan d0vgan closed this as completed Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants