Return to site

Convert text to html for mac

broken image
broken image

The vi command line way I deal with this is:Īnd 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.

broken image

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. 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. 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. 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.