Author Topic: leafpad problem (Solved, hopefully!)  (Read 1212 times)

Offline cstrike77

  • Full Member
  • ***
  • Posts: 220
leafpad problem (Solved, hopefully!)
« on: April 26, 2011, 12:05:23 PM »
Have a slight problem, maybe someone can suggest something. After backing up everything on my now dead lappy, I've found that XP's notepad and leafpad have a problem. Everything done in leafpad is all run together when opening a text file on an XP machine. The strange part is I know notepad in wine opened these files fine, and of all things I was working on webpages for my web site, and were done in leafpad, and everything that is an *.HTML file open fine on an XP machine...

Tks!
« Last Edit: April 30, 2011, 12:44:31 PM by cstrike77 »

Offline pags

  • Hero Member
  • *****
  • Posts: 2517
  • Keep it clean.
Re: leafpad problem
« Reply #1 on: April 27, 2011, 07:16:40 AM »
There are different "formats" for text files in DOS and UNIX (actually, it's the characters that are used to distinguish the end of line (EOL) termination).  DOS uses a CR+LF (that's Carriage Return and Line Feed), while UNIX just uses a LF.  Without the CR, Notepad will fail to "push" the new line down the the next line.  I use Notepad++ in Windows, as it recognizes many formats, and will convert on the fly.  Most Linux programs do the same, so you usually don't see a problem there...

If installing software in Windows is not an option, you should have the console programs dos2unix and unix2dos, which will convert the files back and forth for you...

Offline cstrike77

  • Full Member
  • ***
  • Posts: 220
Re: leafpad problem
« Reply #2 on: April 27, 2011, 12:58:23 PM »
There are different "formats" for text files in DOS and UNIX (actually, it's the characters that are used to distinguish the end of line (EOL) termination).  DOS uses a CR+LF (that's Carriage Return and Line Feed), while UNIX just uses a LF.  Without the CR, Notepad will fail to "push" the new line down the the next line.  I use Notepad++ in Windows, as it recognizes many formats, and will convert on the fly.  Most Linux programs do the same, so you usually don't see a problem there...

If installing software in Windows is not an option, you should have the console programs dos2unix and unix2dos, which will convert the files back and forth for you...


I think I tried CR+LF, I thought about that a while back and started saving everything that way, but either it didn't work or I've not ran into the ones that I saved that way. When I get another lappy I'll look into those programs, I did visit notepad++ and was hoping they did a linux version, but they don't.

But what is totally interesting is that my HTML pages are correct, and viewed in notepad with wine they were correct.

TKS!

Offline pags

  • Hero Member
  • *****
  • Posts: 2517
  • Keep it clean.
Re: leafpad problem
« Reply #3 on: April 27, 2011, 01:07:56 PM »
Strictly speaking .html isn't .txt (even though it is saved as plain text...some programs maybe do a little extra voodoo, depending on what you save them as ;D).

I, personally, think kate is a better Notepad++, so that's what I use in PCLOS.

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3735
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: leafpad problem
« Reply #4 on: April 27, 2011, 01:31:56 PM »
Quote
think kate is a better Notepad++, so that's what I use in PCLOS.

Or medit, or gedit....

Offline pags

  • Hero Member
  • *****
  • Posts: 2517
  • Keep it clean.
Re: leafpad problem
« Reply #5 on: April 27, 2011, 01:46:20 PM »
Quote
think kate is a better Notepad++, so that's what I use in PCLOS.


Or medit, or gedit....


I was thinking more about things like Syntax Highlighting, etc... ;D

gedit is on the left, kate on the right...

Offline daniel

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3735
  • God knows, i'm not an Angel!
    • Tipps und Tricks
Re: leafpad problem
« Reply #6 on: April 27, 2011, 01:55:49 PM »
Syntax Highlighting will works with they, too.
But i'm not sure, if it works with your file  ::)

Medit



Uploaded with ImageShack.us

Kate needs kdelibs4 or?

Offline pags

  • Hero Member
  • *****
  • Posts: 2517
  • Keep it clean.
Re: leafpad problem
« Reply #7 on: April 27, 2011, 02:18:03 PM »

Kate needs kdelibs4 or?

Fair enough...but I'm already running KDE, so that isn't exactly a lot of over-head. ;)

That's the beauty of this...lot's of "default" choices out of the box (well, out of Synaptic, anyway), for whatever works for the individual (not like trying to figure out why MS Notepad is jammin' a bunch of text together that looked fine before)
 ;D

Offline cstrike77

  • Full Member
  • ***
  • Posts: 220
Re: leafpad problem
« Reply #8 on: April 30, 2011, 12:46:36 PM »
Strictly speaking .html isn't .txt (even though it is saved as plain text...some programs maybe do a little extra voodoo, depending on what you save them as ;D).

I, personally, think kate is a better Notepad++, so that's what I use in PCLOS.

I think I remember what it was, I had downloaded a CSS template that I sort of liked, and the *.CSS file was all run together. Could not make heads or tails of it and nuked it.