Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



problem saving with gEdit and then viewing with Notepad

VicRic
07-21-2007, 04:28 AM
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/500/medium/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

almcneil
07-21-2007, 04:37 AM
Yeah, I know what this is.

Basic ASCII-only text files use a special control character to mark the beginning of a newline, '\n' is the newline character. That program gEdit (I'm not familiar with it) isn't using that character to separate the lines, instead uses some other character code. That's why when you open it in Notepad, it displays it all on one line.

You are correct, the file type encoding must match between text programs or else the text will appear messed up.

Ad
07-21-2007, 04:37 AM
  

VicRic
07-22-2007, 02:30 AM
Hey Al, I got advice on how to fix it.

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 in Linux.
I use it like this:
$ unix2dos -n inputfile outputfile.txt
and then move the file outputfile.txt to the Windows machine.

BRgds

almcneil
07-22-2007, 01:30 PM
Yeah, I know unix2dos (or u2d) I used to be a high tech engineer. All that utility does is exactly what I explained above. It adds/removes the newline character, '\n'. That's all!

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

TechSpot Blog: Disable Windows automatic check for solutions after a program crashes

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Weekend tech reading: How to run Chrome OS as a virtual machine

Sony: PlayStation 3 to be 3D-capable via firmware update

iSuppli: DDR3 to account for over half of DRAM shipments by Q2 2010

Facebook named third most popular video website behind YouTube and Hulu

Patriot introduces new PS-100 SSD series

More Tech News

  
 Software Downloads

WinDVD 10.05 Pro 2010 (formerly WinDVD Platinum)

Opera 10.10 for Windows

Mp3tag 2.45

FinalBurner 2.15

Google Chrome 4.0.249.00 Beta

Magic DVD Creator 11.0.10.189

Dynamic Notes 3.44

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.