Text files being buggered when saved
Discussion
Sometimes when I save a large (Only talking 5Kb or so) notepad file the second I click on 'save' or 'save as' all the line breaks are removed, as I say, 'sometimes', the problem is intermittent.
This problem is very annoying and if it doesn't get resolved I will no doubt be posting here again soon with a topic such as 'how do you fix a smashed monitor'
The computer is 2.4Ghz, 256mb running XP.
Any help very appreciated (have tried searching the usual places, no luck).
>>> Edited by rpguk on Monday 27th October 00:26
This problem is very annoying and if it doesn't get resolved I will no doubt be posting here again soon with a topic such as 'how do you fix a smashed monitor'
The computer is 2.4Ghz, 256mb running XP.
Any help very appreciated (have tried searching the usual places, no luck).
>>> Edited by rpguk on Monday 27th October 00:26
Isn't this to do with the WordWrap function being either on or off. If you're importing text into the file and then saving it make sure that the WordWrap function has a tick against it in the Format drop down. This sounds like it is already something that you would have checked - sorry, can't think of any other reason why this would happen intermittently.
Thanks for the reply hut but its not word wrap. Its just that all the carrige returns get removed word wrap on or off.
The problem usually popups up while I'm working on a perl script or HTML file on a server using FTP and editing with notepad (but the problem then also effects wordpad/editpad etc).
It also only effects some files, but not always so for example theres one 4 KB .shtml file at the moment that keeps getting affected all the other files (including other shtml files) I can edit no problem but this one, even if I copy and paste it into another file or anything just won't save while keeping its carrige returns.
It is increadably annoying.
The problem is happening on my windows 98 computer in work as well as my XP machine at home.
Could it maybe some combination of code in the text that forces it to save in binary or something? Or maybe the server is sending some funky commands or something.
I'm at my wits end now. Its the most frustrating problem because I can't work because of it.
Thanks in advance.
Richard.
The problem usually popups up while I'm working on a perl script or HTML file on a server using FTP and editing with notepad (but the problem then also effects wordpad/editpad etc).
It also only effects some files, but not always so for example theres one 4 KB .shtml file at the moment that keeps getting affected all the other files (including other shtml files) I can edit no problem but this one, even if I copy and paste it into another file or anything just won't save while keeping its carrige returns.
It is increadably annoying.
The problem is happening on my windows 98 computer in work as well as my XP machine at home.
Could it maybe some combination of code in the text that forces it to save in binary or something? Or maybe the server is sending some funky commands or something.
I'm at my wits end now. Its the most frustrating problem because I can't work because of it.
Thanks in advance.
Richard.
I sometimes have problems with importing files that originate on different operating systems. Some files get saved with a carriage return / linefeed hex(0d0a) but on some systems they only get the CR or the LF (can't rember offhand which). This could be what is happening here and maybe notepad is unable to cope. You could try checking a susupect file with a hex editor.
devdog said:
I sometimes have problems with importing files that originate on different operating systems. Some files get saved with a carriage return / linefeed hex(0d0a) but on some systems they only get the CR or the LF (can't rember offhand which). This could be what is happening here and maybe notepad is unable to cope. You could try checking a susupect file with a hex editor.
Sadly that didn't do the trick either, thanks though.
Heres a screenshot of the file just before I hit the save button (or do a save as)
And heres a screenshot of the file just after I hit the save button (or do a save as)
sounds like the files were originally created (and hosted?) on a unix box. The unix text format uses a ^M character as a line break which notepad will ignore and hence
up your page.
Try another editor such as MetaPad (www.liquidninja.com/metapad/) or VIM (www.vim.org/), these (and many others) can deal with unix text format OK.
HTH
>> Edited by FunkyGibbon on Tuesday 18th November 18:31

Try another editor such as MetaPad (www.liquidninja.com/metapad/) or VIM (www.vim.org/), these (and many others) can deal with unix text format OK.
HTH
>> Edited by FunkyGibbon on Tuesday 18th November 18:31
FunkyGibbon said:If you're right, Funky, rpguk could simply convert them with unix2dos from the command line.
sounds like the files were originally created (and hosted?) on a unix box. The unix text format uses a ^M character as a line break which notepad will ignore and hence up your page.
Try another editor such as MetaPad (www.liquidninja.com/metapad/) or VIM (www.vim.org/), these (and many others) can deal with unix text format OK.
HTH
>> Edited by FunkyGibbon on Tuesday 18th November 18:31

Gassing Station | Computers, Gadgets & Stuff | Top of Page | What's New | My Stuff