Hi All,
My question is very simple, is it possible to read Unicode text file and normal text file using a one method (CAL Code)?
Version : 2013
Further details:
I read a normal text file in a report, using following method. It works fine.
code
Variables;
name = TextFile data type = File
name = TextLine data type = Text
TextFile.OPEN(TextFileName);
TextFile.READ(TextLine);
code
Then I read a Unicode text file in a report, using following method (because of a client requirement). It works fine.
code
Variables;
name = ReadStream data type = InStream
name = StreamReader data type = DotNet
name = Encoding data type = DotNet
TextFile.CREATEINSTREAM(ReadStream);
StreamReader := StreamReader.StreamReader(ReadStream, Encoding.Unicode);
TextLine := StreamReader.ReadLine;
code
But, a normal text file cannot be read using the method I used for Unicode method.
I need to know, is there a method, which can use to read both normal & Unicode text files.
Thank you.
My question is very simple, is it possible to read Unicode text file and normal text file using a one method (CAL Code)?
Version : 2013
Further details:
I read a normal text file in a report, using following method. It works fine.
code
Variables;
name = TextFile data type = File
name = TextLine data type = Text
TextFile.OPEN(TextFileName);
TextFile.READ(TextLine);
code
Then I read a Unicode text file in a report, using following method (because of a client requirement). It works fine.
code
Variables;
name = ReadStream data type = InStream
name = StreamReader data type = DotNet
name = Encoding data type = DotNet
TextFile.CREATEINSTREAM(ReadStream);
StreamReader := StreamReader.StreamReader(ReadStream, Encoding.Unicode);
TextLine := StreamReader.ReadLine;
code
But, a normal text file cannot be read using the method I used for Unicode method.
I need to know, is there a method, which can use to read both normal & Unicode text files.
Thank you.