Translation Between String Types

The following Win32 functions translate character strings from one string type to another.

Function Description
FoldString Translates one character string to another.
LCMapString Maps a character string by locale.
ToUnicode Translates a virtual-key code into a Unicode character.
MultiByteToWideChar Maps a multibyte string into a wide-character string.
WideCharToMultiByte Maps a wide-character string into a multibyte string.

The WideCharToMultiByte and MultiByteToWideChar functions are particularly useful for applications that support several string types. ANSI C also defines the conversion functions wcstombs and mbstowcs, but they can only convert to and from the character set supported by the standard C library.