wcstombs不适用于中英文等语言 [英] wcstombs is not working with languages such as chinees

查看:72
本文介绍了wcstombs不适用于中英文等语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如何将wcstombs()用于中文字符串.它不适用于中文.请帮助我

在此先感谢

这是我的代码:

Hi,

How to use wcstombs() for chinese string.It is not working with chinese language.Please help me

Thanks in advance

Here is my code:

BSTR key = _T("インフォメーション");
char *szDataIn;
CString str = key ;
int nSize = str.GetLength();
szDataIn = new char[nSize+1];
memset(szDataIn,0,nSize+1);
wcstombs(szDataIn, str, nSize+1);


此处szDataIn由空值组成.


Here szDataIn consists of empty value

推荐答案

您是否根据
Are you doing everything correctly according to the description of the function[^]? Please show your code and any results that you get.


这篇关于wcstombs不适用于中英文等语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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