Text Formatting
-
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 -
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].
-
Thanks, I’ll give it a look.
-
@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 :)
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