Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unwanted chars

 
feroz muhamed
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi when i am writing data(input via keyboard using readLine method) to file using FileWriter,some unknowncharacters like 000 etc were seen what is this how can i avoid it? please help thanx in advnc
 
Adrian Yan
Ranch Hand
Posts: 688
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you writing text file? If you are, use FileWriter.
 
Timmy Marks
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
having the same problem while using FileWriter. When opening the file with notepad there are squares added into the file, but with (for example) wordpad they are gone.
Anyone have any idea where they come from? The text is taken from a JTextArea. The display there is also OK.
 
jason adam
Chicken Farmer ()
Ranch Hand
Posts: 1932
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I notice the same thing when opening some .java files, depending on how the files were created (for example, in JBuilder or some other IDE).
I think it comes from Notepad being a very simple text editor. Wordpad is slightly "smarter", so it knows how to handle special characters and formatting better.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic