View Full Version : Loading text files
02-06-2004, 06:21 AM
I have created a text object and also a basic .txt file in Notepad, then tried to use the 'load' option to display the file in the object. (I am assuming this is what it is for). All I get is an error that 'this is not a valid ASCII text file'???
Has anyone else seen this?
02-06-2004, 06:24 AM
I have narrowed it down to the fact that the text file I am importing contains £ signs...should this cause the error?
08-02-2007, 10:11 PM
I ran into this problem too. In this instance it was because there was a 'curly' apostrophe in the .txt file. This happens when it's typed in word and then copied/pasted into a .txt file. The character doesn't convert to plain text.
Hopes this helps someone else.
08-03-2007, 02:23 PM
If you paste from Word into Notepad and then save the file out as a .txt file it should strip out all the formatting, is my understanding anyway.
I get no problems using this code -
result = TextFile.ReadToString("AutoPlay\\Docs\\test.txt");
to load and display a text file (including the £ sign) in a label.
After 3 years it won't matter to the OP anyway will it :D
Powered by vBulletin™ Version 4.0.6 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.