Re: writeChars not behaving as expected

From: Roedy Green (look-on_at_mindprod.com.invalid)
Date: 05/19/04


Date: Tue, 18 May 2004 23:58:51 GMT

On Tue, 18 May 2004 03:03:12 GMT, "Ken Kafieh"
<kkafieh-StopSp@m@rogers.com> wrote or quoted :

> RandomAccessFile out = new RandomAccessFile(outputFile,"rw");
>
> out.write('a');
> out.writeChars("XXX");
> out.write('b');

see http://mindprod.com/jgloss/fileio.

You are probably writing 16 bit chars, where you editor wants 8 bit.

Random access is normally not human-readable.

-- 
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming. 
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Relevant Pages

  • Re: Character Problem
    ... in this method execpt for the line that outputs the 0xF7 chars, ... I am writing this out to an ... When I open the file in a text editor like notepad or VS IDE, ... of Character Map program into the text file and save it. ...
    (microsoft.public.vc.mfc)
  • Re: LAtex (again)
    ... I reckon Oliver is one of those types who would do well writing ... on how to write a LaTeX document, ... In the beginning you can use Notepad or any other text editor you ...
    (comp.text.tex)
  • Re: Join my all fantasy writers group!
    ... editor doesn't match your picture of what an editor does in their job. ... I only say this because you're responding to Michael, ... Why do you need/want encouragement to pursue writing? ... What would you say the are the various tools of a writer, Miles? ...
    (rec.arts.sf.written)
  • Re: LAtex (again)
    ... But chiefly I want to be able to edit the ... on how to write a LaTeX document, ... and perhaps print your simple examples, you can start writing ... In the beginning you can use Notepad or any other text editor you ...
    (comp.text.tex)
  • Re: Has This Ever Been Done?
    ... picking an editor. ... I just described a scenario I can imagine happening. ... have to develope professional level skill to pick an editor. ... When I'm not writing, I'm doing something ...
    (rec.arts.sf.written)