• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Keep Tabs & Spaces

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using the FileReader & BufferedReader classes to read in a text file & display it in the the brower.
This works fine except that tabs & spaces get left out ie text in the file like this so the start of a new paragraph does not have the tab in front of it that it does in the file.

How can I keep the tabs & spaces format of the text file?
[ March 31, 2002: Message edited by: Dave Donohoe ]
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Enclose the text in <pre> tags. Such as
<pre>
This is the text.
</pre>
 
Dave Donohoe
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Steve! That worked perfectly!
D
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic