0

I want the txt file to look like the notepad++ file. I can use Excel to solve my problem, but I want to solve it with notepad++. ok let me clarify it more. as you see below the notepad++ file is OK but the txt file is NOT OK. even if i go to notepad++ file and press the enter button when i open it in txt file they are still stuck together and no enter has been applied to the file. This is in notepad++:

9176189619
9176189625
9176189634
9176189637
9176189661
9176189674
9176189678
9176189730
9176189742
9176189755

and this is in txt file:

9176189619917618962591761896349176189637917618966191761896791761896789176189739176189742917618975591
jin takada
  • 9
  • 1
  • 3
  • 1
    @DavidPostill I was in the middle of typing an answer when you closed this. It's pretty straightforward what the OP wants -- break the long single line of numbers into several lines with 10 digits on each line. – Excellll Nov 29 '17 at 15:11
  • 2
    @Excellll No it's not. He's saying his notepad++ file looks ok, but the text file doesn't. The question doesn't make sense. – DavidPostill Nov 29 '17 at 15:13
  • @jintakada so at the end you want to split or join the text? – phuclv Nov 29 '17 at 15:14
  • 7
    May be a language thing, but presumably, the OP means that it looks OK in Notepad++ but not OK in other programs (word, notepad etc). If that is the case, I expect the problem is going to be Unix line endings (LF `\n`) instead of Windows style CRLF (`\r\n`). In that case, the OP should see, for example ( https://stackoverflow.com/questions/18923846/match-and-delete-lf-character-in-notepad-regex ) – Yorik Nov 29 '17 at 15:44
  • 1
    Does this answer your question? [Notepad++ split line after given number of characters](https://superuser.com/questions/1088622/notepad-split-line-after-given-number-of-characters) – Toto Jul 27 '23 at 14:40

1 Answers1

2

I believe what you are saying is that if you open the file in notepad++ it will show multiple lines, but if you open it with windows' standard notepad it will only be a single line, correct?

What you are experiencing is how windows is expecting a line break to be formated. Windows is expecting a carriage return (CR) character followed by a line feed (LF) character. Linux, Solaris and Mac are only using the line feed (LF) character for a new line. You have probably a file originally created on one of those operating systems. Notepad++ will automatically detect what format is used in the file and show it correctly, but windows' notepad will not.

To "fix" this, open the file in notepad++, go to Edit > EOL Conversion and select "Windows (CR LF)". Then save the file and open it again in windows' notepad. You should now see the line breaks.

hanjo
  • 1,041
  • 8
  • 8