Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172

    Loading text files

    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?

  2. #2
    Join Date
    Feb 2003
    Location
    Hertfordshire - UK
    Posts
    172
    I have narrowed it down to the fact that the text file I am importing contains £ signs...should this cause the error?

  3. #3
    Join Date
    Jun 2007
    Location
    Indianapolis, IN USA
    Posts
    5

    Error - not valid ASCII .txt file

    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.

  4. #4
    Join Date
    Aug 2003
    Posts
    2,427
    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 -

    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

Similar Threads

  1. rename multiple files
    By jenny62 in forum Setup Factory 6.0
    Replies: 1
    Last Post: 04-13-2004, 01:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts