unicode
-
I want to add multilanguage support to my mfc application.How can i proceed with it. Thanks
-
to give unicode support just define _UNICODE and UNICODE in the preprocessor definition of the project settings.
nave
And remove
_MBCS
.Steve
-
to give unicode support just define _UNICODE and UNICODE in the preprocessor definition of the project settings.
nave
Naveen R wrote:
just define _UNICODE and UNICODE in the preprocessor definition
Defining _UNICODE will implicitly define UNICODE.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
Naveen R wrote:
just define _UNICODE and UNICODE in the preprocessor definition
Defining _UNICODE will implicitly define UNICODE.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
And remove
_MBCS
.Steve
Stephen Hewitt wrote:
And remove _MBCS.
We don't need to remove _MBCS. If we remove it, we will lose MBCS support. Just to add unicode support, defining _UNICODE will be sufficient.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
thanks. I didnt know that. Can u tell me where it is defined?I mean which header file have the code for that?
nave
Naveen R wrote:
I mean which header file have the code for that?
I don't know, but I am very sure about the point. Defining _UNICODE will implicitly define UNICODE too. I've been noticing sometimes people suggesting questioners to define both UNICODE and _UNICODE. But defining _UNICODE will suffice. I thought will point this out now.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
Naveen R wrote:
I mean which header file have the code for that?
I don't know, but I am very sure about the point. Defining _UNICODE will implicitly define UNICODE too. I've been noticing sometimes people suggesting questioners to define both UNICODE and _UNICODE. But defining _UNICODE will suffice. I thought will point this out now.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
-
Stephen Hewitt wrote:
And remove _MBCS.
We don't need to remove _MBCS. If we remove it, we will lose MBCS support. Just to add unicode support, defining _UNICODE will be sufficient.
Nobody can give you wiser advice than yourself. - Cicero ப்ரம்மா
Defining both
_UNICODE
and_MBCS
may cause problems if you use "tchar.h". For example many people use the_T
macro and the "_t" string functions so the same code can be used for Unicode and non-Unicode builds. Take the_tcscmp
function for example. Here's a table from the documentation for this function:TCHAR.H routine _UNICODE & MBCS not defined _MBCS defined _UNICODE defined --------------------------------------------------------------------------- _tcscmp strcmp _mbscmp wcscmp
As you can see the results are not specified if both are defined. Already defining both leaves you in the reals of undocumented behaviour. In this case, with my header files, the Unicode version will be used. However, It's never a good idea to reply on undocumented behaviour in computer programming if you don't have a compelling reason. In general, I remove the
_MBCS
.Steve