TextEdit vs Notepad

I have this XML code in TextEdit:
----------
<?xml version="1.0" encoding="UTF-8"?>
<preference use XMLsentences="YES" erase easysentences="NO" erase mediumsentences="NO" erase hardsentences="NO">
<!--PLEASE PLACE SENTENCES BELOW THIS LINE-->



<!--PLEASE PLACE SENTENCES ABOVE THIS LINE-->
</preference>
----------
In Notepad (on Windows), all this code becomes one very long line of text. It's very problematic because this file gets edited very often. Is there a way to fix it?

Macbook Pro, Mac OS X (10.4.10)

Posted on Sep 14, 2007 7:49 PM

Reply
5 replies

Sep 14, 2007 10:03 PM in response to William Lloyd

Short Answer: I'm not the only one editing the XML file.

I've made a software package that uses two .swf (Adobe Flash) files and one text file. One swf translates user input into XML code, which the user copies and pastes into the text file (swf files can't write data). The other swf reads and processes data from the XML file. If the text file is not user-readable, I am in deep trouble.

Sep 15, 2007 5:42 AM in response to KWarp

I edited the text in Notepad and now it works fine in both.


🙂 Only because unix stuff has become very tolerant of M$tupidity over the years. By using notepad on it, you've converted a normal text file into an abnormal M$ text file.

mac:~ $ od -c text
0000000 n o r m a l t e x t \n
0000014
mac:~ $ od -c ms texttm.txt
0000000 w i n d o z e t e x t \r \n
0000016

It's highly probable that this will not cause any seroius problems, but some unix text editor will probably clobber your windoze text with normal text and you'll be in the same boat using notepad on it again. In fact, ...

mac:~ wmp$ open -a textedit ms texttm.txt
mac:~ wmp$ od -c ms texttm.txt
0000000 i s t h i s s t i l l \n w i
0000020 n d o z e t e x t ? \r \n
0000035

I get a real kick out of the fact that this is still a problem decades later.

I really like this editor as a replacement for notepad ...

http://www.baradine.com/ftp/public/Pfe32/

It recognizes the difference between unix and ms text files and does no conversion unless you specifically ask it to. It's got a lot of very nice features. Hacker friendly, macros, powerful, yet light weight. Very unobtrusive install / uninstall. Good stuff.

Now that I mention it, I'm in the market for something similar for the Mac. TextEdit tastes like a bad combination of notepad and wordpad.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

TextEdit vs Notepad

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.