Hi Tom,
I don't think there is anything wrong with your method of writing to file (except for the obvious lack of explicitly ensuring US-ASCII or UTF-8 is used). In which case it is more likely to be your method of creating the string that is problematic.
To
test this, I wrote some code (that is deliberately bad code - it is better for you to find a good solution to your own problem than to copy my code). My program is
When run, I can see the file looks reasonable:
Regards, Andrew
[ July 14, 2005: Message edited by: Andrew Monkhouse ]