使用C#从dat文件读取时出错 [英] Error reading from a dat file with C#

查看:206
本文介绍了使用C#从dat文件读取时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我创建了一个非常大的dat文件,其中包含正弦波值,但是当我尝试从该文件中读取数据以便在检查eof条件时进行绘图时,使用以下命令:
而(br.PeekChar()!=-1)
{
//阅读
}
我收到错误消息:
输出的char缓冲区太小,无法包含已解码的字符,编码为" Unicode(UTF-8)"回退" System.Text.DecoderReplacementFallback"".

请告诉我如何解决?

PS可以在这里使用blob对象的任何方式吗?


i have created a very large dat file which contains sine wave values in it, but when i try to read from this file in order to plot while checking the eof condition with:
while (br.PeekChar()!=-1)
{
//read
}
I get the error:
"The output char buffer is too small to contain the decoded characters, encoding ''Unicode (UTF-8)'' fallback ''System.Text.DecoderReplacementFallback''".

Please tell me how to resolve this?

P.S any way to use blob object here?

推荐答案

为什么不张贴发生错误的行(即读取数据的那一行)?

请注意:在原始帖子中张贴任何其他信息(修改),请勿添加假"答案.

:)
Why don''t you post the line wherein the error occurs (i.e. the one reading data)?

Please Note: post any additional info inside your original post (modify it), don''t add a ''fake'' answer.

:)


谢谢您的快速回复...
我通过使用Blob计数器解决了该错误...
再次感谢...:)
hi thank you for the fast reply...
i solved that error by using a blob counter...
thanks again... :)


这篇关于使用C#从dat文件读取时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆