Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
General Discussions
Switcher Hangout (Windows to Mac)
A way to convert Mac .txt files to Windows .txt files
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="walkerj" data-source="post: 427466" data-attributes="member: 9385"><p>This is also why I use command line utilities for both OS's, and this is something that goes back to the early days of all the UNIX's and the DOS world.</p><p></p><p>You'll note that if you use vi on a text file created by a Windows notepad, for example, will show ^M characters at each newline, while text files created by Mac OS X will look all goofy using windows notepad. Oddly enough, if you edit a text file created by Mac OS X with the "DOS" command line 'edit' command under Windows and just save it, it'll convert the newlines to what Windows expects with the rest of the Windows text editors.</p><p></p><p>Over on the Mac side, TextEdit generally seems to handle text files properly regardless of where they are created, but vi will show those 'crlf' characters as a ^M, which is not a big deal, but annoying. The vi command line way I deal with this is:</p><p></p><p>:%s/'control-v''control-m'//</p><p></p><p>and they will be be converted to 'cr' (carriage return, not carriage return-linefeed) and when you save the file it'll be all well in the UNIX world.</p><p></p><p>This is probably all confusing to non-UNIX geeks, but this is something I've had to deal with for the entire 20+ years I've been dealing with text between DOS and UNIX. It's real fun when you have thousands of text scripts that have to be ported across OSes and have to figure out what program can best be used to batch convert them all.</p></blockquote><p></p>
[QUOTE="walkerj, post: 427466, member: 9385"] This is also why I use command line utilities for both OS's, and this is something that goes back to the early days of all the UNIX's and the DOS world. You'll note that if you use vi on a text file created by a Windows notepad, for example, will show ^M characters at each newline, while text files created by Mac OS X will look all goofy using windows notepad. Oddly enough, if you edit a text file created by Mac OS X with the "DOS" command line 'edit' command under Windows and just save it, it'll convert the newlines to what Windows expects with the rest of the Windows text editors. Over on the Mac side, TextEdit generally seems to handle text files properly regardless of where they are created, but vi will show those 'crlf' characters as a ^M, which is not a big deal, but annoying. The vi command line way I deal with this is: :%s/'control-v''control-m'// and they will be be converted to 'cr' (carriage return, not carriage return-linefeed) and when you save the file it'll be all well in the UNIX world. This is probably all confusing to non-UNIX geeks, but this is something I've had to deal with for the entire 20+ years I've been dealing with text between DOS and UNIX. It's real fun when you have thousands of text scripts that have to be ported across OSes and have to figure out what program can best be used to batch convert them all. [/QUOTE]
Verification
Post reply
Forums
General Discussions
Switcher Hangout (Windows to Mac)
A way to convert Mac .txt files to Windows .txt files
Top