I have an MFC application where the Character Set is "Not Set". What are the risks associated with running this application on a OS that has a Multi Byte Character Set code page?
Risks of running on single byte character app on a MBCS OS
121 Views Asked by JonDrnek At
2
There are 2 best solutions below
0

The risks are:
1) If you use non-English texts, and the user enters, say, Russian, some Russian characters that are not mapped to MBCS or require a Charset layer, will be retrieved as '?'
2) You need to inform the customer that the App. accepts English-only and no guarantee the App, when entering non-English characters, would accept or retrieve non-English texts correctly.
3) Any texts with foreign language characters may lead to unwanted or undesired conversion of accents and diacritics to something else.
The "Character Set: Not Set" option defines neither
_MBCS
nor_UNICODE
. That means that you're using the *A series of functions. Those will return MBCS strings, even when_MBCS
is not defined.If
_MBCS
doesn't affect the strings returned from the *A functions, then what does it do? It maps some<tchar.h>
tcs*
functions to theirmbs*
versions, instead of thestr*
orwcs*
variants. E.g. without_MBCS
,_tcsrev
maps tostrrev
, not_mbsrev
.Therefore, you may not be able to reverse the multi-byte strings you receive from the OS, or edit them otherwise.