Problems when reading a txt.file

 

I have  generated a txt file containing just "Hello World".

When opening the file by using this code I don´t see the expected text "Hello World" but only "squares" inside the Journal Window of the tester. Any idea?

 

 Journal

string ReadPatternFile()

{

string PatternString;

int filehandle=FileOpen("patternfile.txt",FILE_READ|FILE_TXT);

   if(filehandle!=INVALID_HANDLE)

     {

            PatternString = FileReadString(filehandle);

     } else Print("Operation FileOpen failed, error ",GetLastError());

   FileClose(filehandle);

    Print (PatternString);  //Why do I see only squares?

  return PatternString;

   

 }   

 

what about the codepage?

Your file is ANSI or UNICODE?


 
Yes - the codepage was ANSI. After changing to UNICODE I see "Hello World". Thank you very much!