read streams line by line

前端 未结 2 597
你的背包
你的背包 2021-01-13 19:22

Is there a way in Delphi to read streams ,line by line?

Is there a way to set the encoding of the stream?

I know of

TEncoding.getEncodingPa         


        
2条回答
  •  被撕碎了的回忆
    2021-01-13 20:09

    I think you're looking for TStreamReader. You set the encoding in the constructor and then call ReadLine.

    In terms of how to get the encoding from the stream, that depends very much on what is in the stream, doesn't it?

提交回复
热议问题