如何在VC ++中找到UTF-8的文本文件编码格式 [英] How to find a text file encoding format for UTF-8 in VC++

查看:426
本文介绍了如何在VC ++中找到UTF-8的文本文件编码格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在VC ++中找到UTF-8的文本文件编码格式.

How to find a text file encoding format for UTF-8 in VC++.

推荐答案



MultiByteToWideChar()可以解决问题..

干杯
Hi,

MultiByteToWideChar() will do the trick..

Cheers


如果要在UTF-8编码文件中进行文本搜索,请

首先将文件读入字节数组的缓冲区

然后将缓冲区转换为宽字符数组

然后最后在宽字符串中搜索所需的文本
If you want to do text search in UTF-8 Encoded File then

First read the file into buffer of byte array

Then Convert the buffer into wide character array

then finally search into that wide character string for your desired text


UTF-8 一种文本文件编码格式.您到底想达到什么目的?
UTF-8 is a text file encoding format. What exactly are you trying to achieve?


这篇关于如何在VC ++中找到UTF-8的文本文件编码格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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