Re: write into a file

From: Andrew Thompson (SeeMySites_at_www.invalid)
Date: 02/08/04


Date: Sun, 08 Feb 2004 09:49:41 GMT

Tor Iver Wilhelmsen wrote:
> ionalia123@hotmail.com (Junior) writes:
>
>> can somebody help me with write file ? i am trying to do print '\n'
>> (enter) into .txt file(i try to open use note pad), but somehow it
>> doesn't work.
>
> Yes it does, it's Notepad that doesn't work. Notepad only accepts
> "\r\n" as line ending, treating a single "\n" as an unprintable
> character.

Most Windows based editors are not
broken like NotePad. Having said that,
you cen get the default system 'new line'
using

System.getProperty( "line.separator");

I would still recommend using another
editor though.

--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology


Relevant Pages

  • Re: Stripy tables (Dreamweaver plugin or other tool wanted)
    ... No, good text editors, not Notepad. ... server-side scripts which generate HTML; the OP has existing pageof HTML which he wants to edit with "help" from some utility. ... I wouldn't disagree that there are plenty of good and useful text editors out there and I certainly wouldn't argue with anyone who preferred to use one of those instead of Dreamweaver. ...
    (uk.net.web.authoring)
  • Re: How to make my file a .htm?
    ... Hack around in Windows Explorer and switch off ... too stupid to understand a file extension, so it hides them from you. ... when saving files from Windows-OCD tools like NotePad ... Editors from people who actually use ...
    (comp.infosystems.www.authoring.html)
  • Re: Please help with this presumably simple parse error
    ... With so many free an infinitely better editors ... For Windows I like Notepad ++ ... Geoff Berrow ...
    (comp.lang.php)
  • Re: Hey Babe, dats a nice pair you got there--vise jaws, that is... [Re: G-Code Librarie
    ... Notepad does support a mouse wheel. ... Altho Wordpad/notepad can't open multiple files, it's easy enough to multiply open notepad, and tile various g-code pgms, for editing, ... Most text editors these days will generally assume that the text you are messing with is some form of program text, will structure the text that you type according to the layout rules for that language, and provide facilities to incorporate your text files within some large process. ...
    (alt.machines.cnc)
  • Re: Date Time Stamp?
    ... Perhaps one of the many text editors for OS X also have this functionality. ... on OS X that compares to NotePad. ... I use TextMate as my default text editor, and I recall that it has the ability to insert an ISO formatted datestamp into a document. ...
    (comp.sys.mac.system)