Leafpad Text Editor question

Booting, installing, newbie
Post Reply
Message
Author
User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

Leafpad Text Editor question

#1 Post by chrome307 »

Hi there

When I use Leafpad Text Pad Editor to create a text file and then open the same file in a MS Windows environment I get this display.

Image

Windows does not seem to like the carriage returns on each line and displays symbols to indicate this, is there a way to change this so both OSes can view this back the same?

Thanks

User avatar
William (Dthdealer)
Posts: 146
Joined: Thu 30 Oct 2008, 06:41
Location: Australia (GMT +10)

#2 Post by William (Dthdealer) »

At the end of each line of text, text editors (such as leafpad) add invisible 'next-line' characters. There are two types, both (in practice) identical. CR, carriage return, and LF, line-feed.

*nix based systems only use LF, but Windows puts both CR and LF at the end of lines. Notable is the fact that Macintosh uses CR.

Windows therefore doesn't understand and replaces the LF with the 'square' I-don't-know-what-this-character-is symbol. Where the lines should break they just join instead.

I don't believe Puppy has the dos2unix or unix2dos tools to convert a file. You'll have to open it up in Geany. Look under the menu Document-->Line endings and then save again.

User avatar
chrome307
Posts: 708
Joined: Thu 15 Jan 2009, 11:00

#3 Post by chrome307 »

OK thanks for the explanation and the solution. Looks like I'll have to use Geany instead of Leafpad.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

Leafpad Text Editor question

#4 Post by Sit Heel Speak »

If you need CR/CRLF/LF conversion capability in Windows, if you will permit a shareware plug...P.J. Naughter's Notpad. One month free trial and then a US$10 registration fee if you keep it, provided you send the dough directly to Mr. Naughter ($15 if through the service). I've been using it since 1994, no complaints.
http://www.naughter.com/notpad.html

ITAmember
Posts: 167
Joined: Sun 13 Sep 2009, 18:50
Location: The middle of a cornfield

#5 Post by ITAmember »

open the text files in windows under wordpad instead of notepad, it can handle unix newlines.

Bruce B

#6 Post by Bruce B »

Good and diverse answers. I want to add:

1) Puppy comes with the utility to convert the line endings.

2) There are free utilities for people who use the alternate operating system

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#7 Post by Sit Heel Speak »

Bruce B wrote:...1) Puppy comes with the utility to convert the line endings.
Bruce is modestly referring to dos2unix, an excellent explanation of which is to be found in his Text User Interface tutorial, 11th chapter (message)
here.

Free Windows utilities of course exist, but nothing else combines everything-you-need all-in-one like Notpad. The right-side scroll-button tells you what line number you're at in a tooltip, and a 1-megabyte 100,000-line file doesn't faze it. It has half-decent text-to-voice, too. Anyway, I like it a lot.

Post Reply