本文介绍了如何从文本文件读取非ASCII字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我找到了使用seekg和tellg的长度,然后将它们读入unsigned char *。调试器显示的文本不正确。
I found the length using seekg and tellg, then read them into an unsigned char*. The debugger is showing incorrect text though.
$edit: now textfile only shows . l and debugger shows .\xl
推荐答案
作为你的代码if.read可以获得文件二进制。你的程序是字符串输出除了。你可以打印字符从使用%c从缓冲区
As your code if.read can get file binary. your program is string output except. you can print character on by on use %c from buffer
这篇关于如何从文本文件读取非ASCII字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!