Community
    • Login

    Text Formatting

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 7.9k 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

      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
      • gstaviG
        gstavi
        last edited by

        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 Reply Quote 0
        • ?
          A Former User
          last edited by

          Thanks, I’ll give it a look.

          1 Reply Last reply Reply Quote 0
          • ?
            A Former User @gstavi
            last edited by

            @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
            • First post
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors