problem saving with gEdit and then viewing with Notepad
Hi. I'm using gEdit in both Fedora 6 and SUSE 10. I mostly use it to paste interesting text that I cut from web pages and then saving the text into a file.
The problem is that when I save the text into a file I get the following default option: http://www.techspot.com/gallery/data.../geditsave.png if I accept that and save and then move the file to a Windows machine and open it with Notepad then the text does not look as it should - you'd see all the text in one line, and the line breaks as the 'blank square' special character. Any idea on how can I solve this? I notice that Notepad saves its text into ANSI encoding, and gEdit only gives me options to save it in 'Current Locale UTF-8', 'Western ISO 8859-1', 'Western ISO 8859-15'. I don't see the option in gEdit to save the file in ANSI encoding, and I cannot 'Add' it. BRgds |
Linux saves text files differently then windows
you have to use a conveter to convert the files from linux to windows |
A (very) quick and dirty solution is to open it in Wordpad and resave it. Wordpad seems to handle encoding differently than Notepad.
|
unix2dos is probably what you need. Most distros have this package in their repos.
|
dos2unix/unix2dos
dos2unix --> for files created in Windows
unix2dos --> for files created in Linux and UNIX Pretty sure that should work. |
Thanks guys.
Using WordPad does solve the problem: you open the 'unix' file with WordPad and it's already readable. If you want to keep a converted copy then select in WordPad to save the file as type TextDocument-MSDOSFormat. Unix2dos also works; too bad it's a Terminal utility. I use it like this: $ unix2dos -n inputfile outputfile.txt and then move the file outputfile.txt to the Windows machine. BRgds |
Notepad++
The other tool you could use and I really like is Notepad++, its free and you can find it at sourceforge.net (http://sourceforge.net/projects/notepad-plus/) I like this tool for writing scripts in and you can easily open a new document and copy your work over then save it as the txt file (which would default to DOS because Notepad++ is a Windows APP). The documents you currently have open in the program are also in tabs so you can switch through many documents at once - great for multitasking.
Enjoy! |
All times are GMT -5. The time now is 12:37 PM. |