dcsimg
Character encoding & file read/write problem: mystery elements appearing
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Megan_Standish
Posted On:   Friday, January 11, 2002 01:59 PM

I'm writing an app that does the following: Opens a .html file and reads the contents into a String Sifts through the string, grabbing bits and pieces of content we wish to preserve Stores the content chunks into an .xml file Opens an html template file and reads the contents into a String Merges the data from the .xml file and the template string into a final string, and saves that as a brand new standardized .html file The problem is that for some reason, I get lots of annoying par ab ab type crap in the final .html file, and I've tried forcing the character encoding to ISO-8859-1 using InputStreamReader/OutputStreamWriter objects.    More>>

I'm writing an app that does the following:


  1. Opens a .html file and reads the contents into a String
  2. Sifts through the string, grabbing bits and pieces of content we wish to preserve
  3. Stores the content chunks into an .xml file
  4. Opens an html template file and reads the contents into a String
  5. Merges the data from the .xml file and the template string into a final string, and saves that as a brand new standardized .html file


The problem is that for some reason, I get lots of annoying par ab ab type crap in the final .html file, and I've tried forcing the character encoding to ISO-8859-1 using InputStreamReader/OutputStreamWriter objects. No joy.


Any ideas or tips or basic information anyone would have regarding the unwanted par or ab elements in the file would be appreciated. Right now I'm stumped as to how to get rid of them. Thanks!

   <<Less
About | Sitemap | Contact