How to make an app - Andromo App Maker

Announcement

Collapse
No announcement yet.

Loading text files

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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?
    With our fists clenched,
    We cannot shake hands

  • #2
    I have narrowed it down to the fact that the text file I am importing contains signs...should this cause the error?
    With our fists clenched,
    We cannot shake hands

    Comment


    • #3
      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.

      Comment


      • #4
        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

        Comment

        Working...
        X