🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #17266

Re: Problems writing newlines to a file

#17266
From: Rich Downing
Date: Mon, 23 Nov 1998 00:00
20 lines
1500 bytes
> Actually, it now looks like it was only showing up wrong in Notepad, not
>anyplace else I would view it, so maybe it's not a problem after all. Just a
>little confusing though.

I had a similar problem using a BufferedWriter.  I used to append "\n"
to the String sLine variable. I was writing to a .txt file and it
would not display properly in Notepad.  Instead of appending "\n" to
the line I started using newLine(), and now it displays appropriately
in everything.

dataOut.write(sLine);
dataOut.newLine();

Rich
----------------------------------------------------------------------
Richard V. Downing               Home: http://rvd.home.mindspring.com
Senior Software Engineer                    Work: http://www.vsin.com   
VideoConferencing Systems, Inc.             Email: rvd@mindspring.com
Norcross, Ga
------------ When surrounded by wolves 'tis best to howl -------------
Technical Details
Message-ID: <365959a0.6177446@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <72sc3h$14a13@forums.borland.com> <7311k7$qo74@forums.borland.com> <734ng8$el34@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,1b6563995c977abb
X-Google-Attributes: gidf74b3,public
From: rvd@mindspring.com (Rich Downing)
Subject: Re: Problems writing newlines to a file
Date: 1998/11/23
Message-ID: <365959a0.6177446@forums.borland.com>
X-Deja-AN: 414788930
Content-Transfer-Encoding: 7bit
References: <72sc3h$14a13@forums.borland.com> <7311k7$qo74@forums.borland.com> <734ng8$el34@forums.borland.com>
Content-Type: text/plain; charset=us-ascii
Organization: mindspring.com
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language