• Login
Community
  • Login

Text Formatting

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 Posters 8.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ?
    A Former User
    last edited by Nov 29, 2016, 10:58 AM

    Hi,

    I have created a C# application that creates a UTF-8 encoded text file (*.txt). It creates this file which when opened in Notepad displays correctly…however, when I open the file in Notepad++ the file has additional carriage returns and blank lines within it.

    Has anyone come accross this type of formatting discrepancy before, is there a specific encoding I should be using to ensure correct display within Notepad++ ?

    For reference, all development and checking is taking place on Windows (7 sp1).

    Thanks
    Andy

    1 Reply Last reply Reply Quote 0
    • G
      gstavi
      last edited by Nov 29, 2016, 12:15 PM

      I suggest for you to use:
      View --> Show Symbol --> Show End of Line
      Or even an hex editor if you have one available.

      My guess is that your C# app generates something like [CR][LF][LF] which Notepad interprets as a single end-of-line of type [CR][LF] but NP++ interpret as 2 end-of-lines of type [LF].

      ? 1 Reply Last reply Nov 29, 2016, 2:54 PM Reply Quote 0
      • ?
        A Former User
        last edited by Nov 29, 2016, 2:28 PM

        Thanks, I’ll give it a look.

        1 Reply Last reply Reply Quote 0
        • ?
          A Former User @gstavi
          last edited by Nov 29, 2016, 2:54 PM

          @gstavi Yes that was spot on…my text manipulation was looking at \r [CR] when all it needed was to llok at \n [LF] first instead ! Thanks :)

          1 Reply Last reply Reply Quote 0
          1 out of 4
          • First post
            1/4
            Last post
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors