Community
    • Login

    Text Formatting

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    4 Posts 2 Posters 8.5k Views 1 Watching
    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.
    • ? Offline
      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 Offline
        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
        • ? Offline
          A Former User
          last edited by

          Thanks, I’ll give it a look.

          1 Reply Last reply Reply Quote 0
          • ? Offline
            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

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