Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #26172

Re: Reading a text file

From Joshua Cranmer <Pidgeot18@verizon.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Reading a text file
Date 2011-02-12 00:00 -0500
Organization A noiseless patient Spider
Message-ID <ij544k$vbh$1@news.eternal-september.org> (permalink)
References <19a4db14-7d28-465f-9f49-bdcee93a0ac7@s3g2000vbf.googlegroups.com> <64e6f4db-a931-400a-87d4-16da79e8af17@z31g2000vbs.googlegroups.com> <7e8027f8-7ee4-48bc-bfc1-341f6581d326@a28g2000vbo.googlegroups.com>

Show all headers | View raw


On 02/11/2011 11:57 PM, bruce wrote:
> Okay.. I still don't know how the problem appeared. But, I loaded the
> problem file into Notepad+, set the Encoding to UTF-8. The problem is
> gone. So, somehow the problem file was saved with Encoding set to
> something that gave the spacing problem.

If it was set to Unicode in Notepad, it would have saved as a UTF-16 
file, so the first characters would have been null characters. This was 
something I had considered, but I am used to terminals simply ignoring 
null characters on output, so I didn't know if the Swing stuff would 
have displayed it as nothing or a space. Apparently, it is the latter...

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Find similar


Thread

Re: Reading a text file bruce <bruceaj@bellsouth.net> - 2011-02-11 20:57 -0800
  Re: Reading a text file Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-02-12 00:00 -0500

csiph-web