Breyta

Deila með


Internationalization Strategies

Depending on your target operating systems and markets, you have several internationalization strategies:

  • Your application uses Unicode.

    You use Unicode-specific functionality and all characters are 16 bits wide (although you can use ANSI characters in some parts of your program for special purposes). The C run-time library provides functions, macros, and data types for Unicode-only programming. MFC is fully Unicode-enabled.

  • Your application uses MBCS and can be run on any Win32 platform.

    You use MBCS-specific functionality. Strings can contain single-byte characters, double-byte characters, or both. The C run-time library provides functions, macros, and data types for MBCS-only programming. MFC is fully MBCS-enabled.

  • The source code for your application is written for complete portability — by recompiling with the symbol _UNICODE or the symbol _MBCS defined, you can produce versions that use either. For more information, see Generic-Text Mappings in tchar.h.

    You use fully portable C run-time functions, macros, and data types. MFC's flexibility supports any of these strategies.

The remainder of these topics focus on writing completely portable code that you can build as Unicode or as MBCS.

See also

Unicode and MBCS
Locales and Code Pages