View Full Version : Loading text files
dulux1309
02-06-2004, 07:21 AM
Hi,
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?
dulux1309
02-06-2004, 07:24 AM
I have narrowed it down to the fact that the text file I am importing contains £ signs...should this cause the error?
Julia@ININ
08-02-2007, 11: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.
longedge
08-03-2007, 03: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");
Label.SetText("Label1", result);
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
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.