Recent

Author Topic: [SOLVED] Using TFileStream to write plan old text files  (Read 8879 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 9142
Re: Using TFileStream to write plan old text files
« Reply #15 on: August 05, 2017, 10:59:58 am »
Ah, I see what you mean. Might suit some others but certainly not me. I'm writing out some xml to be read in another application so must be plain old text file I'm afraid.
If you are writing xml, just use a TFilestream and  write buffered, do not use the string functions in that case.
Point is: XML doesn't care about line endings or zero termination at all, so provided your other application expects valid XML that should simply work.
You will loose some text formatting (not within the XML tags, though), but that formatting is not part of XML itself..... It is just to make it easy on the eyes.
also related to equus asinus.