问题描述
我有一个20年的MFC项目,仍在日常使用中。在将其更新到VS2015时,我开始收到警告,MBCS现已弃用,并将在未指定的某个未来日期删除,因此很明显是Unicode Is The Future™。
我们'已经有数千个保存的文件包含序列化的MBCS CString
s - 如果我将程序转换为Unicode(因此宽 CString
),它仍然必须能够反序列化它们。
是启动Unicode转换以将项目设置为Unicode并转换每个 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 CString
s - 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?
推荐答案
这篇关于在Unicode项目中反序列化MBCS CString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!