Side-effect of deprecation of MBCS support for MFC in VS 2013

大憨熊 提交于 2019-12-11 17:58:04

问题


I just tried to compile an old MFC app under VS2013. It complained that non-Unicode MFC applications were deprecated, and refused to compile. Which is somewhat contrary to this announcement that talks about deprecating support for MBCS. Until now there were three choices for the Character Set option:

  • Unicode
  • MBCS
  • Not set

Personally, I'm entirely comfortable with dropping support for MBCS - I neither want nor need MBCS. But nor do I want nor need Unicode - ANSI/ASCII is just fine by me. So insisting that every MFC application henceforth must speak Unicode, and (in effect) provide the foundations of a platform support all possible languages, no matter who its intended audience is, seems... extreme. Am I missing something? Should I still be able to compile an MFC application with no character set specified under VS2013?


回答1:


You can. Currently all my programs use the Unicode library. Except one older one, that includes very old code from previous versions and this program is needed for update support for this od version...

  1. Currently there is an Addon that still supports MBCs.
  2. Vote for it
  3. As I understand the discussion (see comment of Mark Davis dated December 2014) such an Addon will be available up and including VS2015 (whatever Version is meant).

To be more precise what happens when you select "None" for the character set:

  1. You program is linked against the MBCS Version of the MFC
  2. Also the Windows SDK will Default to the MBCS Version of the API. So i.e. GetWindowTextA is calls instead of GetWindowTextW

So in fact. Setting _UNICODE and _MBCS to nothing just Defaults to _MBCS...

Internally the SDQ always checks a if UNICODE (not _UNICODE) is set. If not the MBCS Version is chosen.



来源:https://stackoverflow.com/questions/29200903/side-effect-of-deprecation-of-mbcs-support-for-mfc-in-vs-2013

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!