Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-21-2007, 02:31 AM
|
#1
|
|
Member
Registered: Sep 2006
Location: Vancouver, Canada
Distribution: Mandriva 2010 / Fedora 15 2.6.40.6-0
Posts: 44
Rep:
|
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
|
|
|
|
07-21-2007, 02:40 AM
|
#2
|
|
Senior Member
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079
Rep:
|
Linux saves text files differently then windows
you have to use a conveter to convert the files from linux to windows
|
|
|
|
07-21-2007, 02:41 AM
|
#3
|
|
Member
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 474
Rep:
|
A (very) quick and dirty solution is to open it in Wordpad and resave it. Wordpad seems to handle encoding differently than Notepad.
|
|
|
|
07-21-2007, 02:42 AM
|
#4
|
|
Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298
Rep:
|
unix2dos is probably what you need. Most distros have this package in their repos.
|
|
|
|
07-21-2007, 01:00 PM
|
#5
|
|
Member
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Rep:
|
dos2unix/unix2dos
dos2unix --> for files created in Windows
unix2dos --> for files created in Linux and UNIX
Pretty sure that should work.
|
|
|
|
07-22-2007, 12:27 AM
|
#6
|
|
Member
Registered: Sep 2006
Location: Vancouver, Canada
Distribution: Mandriva 2010 / Fedora 15 2.6.40.6-0
Posts: 44
Original Poster
Rep:
|
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
|
|
|
|
07-24-2007, 08:30 PM
|
#7
|
|
Member
Registered: Sep 2006
Location: Canada, Alberta
Distribution: RHEL 4 and up, CentOS 5.x, Fedora Core 5 and up, Ubuntu 8 and up
Posts: 251
Rep:
|
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!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:15 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|