在Unicode项目中反序列化MBCS CString [英] Deserializing MBCS CString in Unicode project

查看:71
本文介绍了在Unicode项目中反序列化MBCS CString的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个20年的MFC项目,仍在日常使用中。在将其更新到VS2015时,我开始收到警告,MBCS现已弃用,并将在未指定的某个未来日期删除,因此很明显是Unicode Is The Future™。



我们'已经有数千个保存的文件包含序列化的MBCS CString s - 如果我将程序转换为Unicode(因此宽 CString ),它仍然必须能够反序列化它们。



是启动Unicode转换以将项目设置为Unicode并转换每个<的最简单方法程序中的code> CString 到 CStringA 所以它保持单字节表示?

I've got an MFC project which is 20 years old and is still in daily use. While updating it to VS2015 I started getting warnings that MBCS is now deprecated and will be removed at some unspecified future date, so clearly Unicode Is The Future™.

We've got thousands of saved files containing serialized MBCS CStrings - if I convert the program to Unicode (and hence wide CString), it is still going to have to be able to deserialize them.

Is the easiest way to start the Unicode conversion to set the project to Unicode and convert every CString in the program to a CStringA so it stays with a single-byte representation?

推荐答案

参见 http://blogs.msdn.com/b/vcblog/archive/2013/07/08/mfc-support-for-mbcs-deprecated-in-visual-studio-2013.aspx [ ^ ]。


这篇关于在Unicode项目中反序列化MBCS CString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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