逐行阅读流 [英] read streams line by line
本文介绍了逐行阅读流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法设置流的编码?
我知道
TEncoding.getEncodingPage(1250);
如何从流中获取?
解决方案
我想你正在寻找 TStreamReader
。您可以在构造函数中设置编码,然后调用 ReadLine
。
关于如何从流中获取编码,这在很大程度上取决于流中的内容,是吗?
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.getEncodingPage(1250);
How to get it from stream?
解决方案
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?
这篇关于逐行阅读流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文