Line Number
-
I downloaded the following file
http://www.gutenberg.org/files/2701/2701-0.txtIf I search for “CHAPTER 1. Loomings.”
using notepad in windows, it is found in line 850.
using notepad++, it is found in line 1699.
Why there is a difference in line number?
Thanks. -
@Mohamed-Elgoussi said:
“CHAPTER 1. Loomings.”
well I find it twice, line 48 and line 850.
What is the last line number in your document?
Cheers
Claudia -
@Claudia-Frank said:
I am talking about line 850.
If I view the file via notepad in windows, it is found in line 850, while last line is 22335
If I view the file via notepad++, it is found in line 1699, while last line is 44669 -
I would assume that the document was pasted twice in notepad++ and the cursor
is placed after line 850 (or at least after the word loomings) when doing the search.
Make sure that the cursor is on line 1 by clicking into it before searching for the word.
As said, it is working for me.Cheers
Claudia -
Hello, @mohamed-elgoussi,
If I view the file via notepad in windows, it is found in line 850, while last line is 22335
If I view the file via notepad++, it is found in line 1699, while last line is 44669It’s easy to notice that
44669=22335+22334and that1699=850+849So, I suppose that, when you pasted the contents of your 2701-0.txt file, you probably did it twice !!
With my N++
v7.5.1version, I do obtain2occurrences of theCHAPTER 1. Loomings.string, at column1of the two lines48and850, with the optionsNormalsearch andWrap around:-)
For information, your
UTF-8file contains22,334lines, of71characters max, for a total of1,276,200bytesThis total can be broken down into :
1,208,075 characters, coded in 1 byte => 1,208,075 bytes 48 characters, coded in 2 bytes => 96 bytes 7,787 characters, coded in 3 bytes => 23,361 bytes ---------- --------- CHARS 1,215,910 characters 1,231,532 bytes 22,334 characters Carriage Return (CR) 22,334 bytes 22,334 characters Line Feed (LF) 22,334 bytes ---------- --------- TOTAL 1,260,578 characters 1,276,200 bytesBest Regards,
guy038
-
Dear Sir,
I have not pasted any thing twice.
in R I run the following:
download.file(“http://www.gutenberg.org/files/2701/2701-0.txt”, “xx.txt”) in R
scan(“xx.txt”, what = “”, skip = 849, nlines = 1)
[1] “CHAPTER” “1.” “Loomings.”
i.e. which means that CHAPTER 1. Loomings. exists in line 850 not 1699 (as it is shown in file via notepad+).
Thanks -
Hello, @mohamed-elgoussi,
I don’t understand ! Downloading from your second post, the contents, I obtain exactly the same file as before !
You say :
which means that CHAPTER 1. Loomings. exists in line 850 not 1699 (as it is shown in file via notepad+)
I’m sorry to insist, but, in my Notepad++
v7.5.1, I do have an occurrence ofCHAPTER 1. Loomings., in line850, and nothing, in line1699!BTW the line
1699is a pure blank line, surrounded by the text, as below :his teeth, sprang into bed with me. I sang out, I could not help it now; and giving a sudden grunt of astonishment he began feeling me. Stammering out something, I knew not what, I rolled away from him against the wall, and then conjured him, whoever or whatever he mightI don’t see. Hope that someone else will understand your problem !
Cheers,
guy038
-
-
The end of line is screwed, probably something like <CR><LF><LF>, Notepad++ sees every line as a line + blank line.
So Line number in Notepad++ is multiplied by 2.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login