Article ID: 108450 - Last Review: July 11, 2005 - Revision: 3.1 MultiByteToWideChar() Codepages CP_ACP/CP_OEMCP
This article was previously published under Q108450 SUMMARY
MultiByteToWideChar() maps a character string to a wide-character string.
The declaration of this application programming interface (API) is as
follows:
If Win32 ANSI APIs are used to get filenames from a Windows NT system, use CP_ACP when converting the string. Windows NT retrieves the name from the physical device and translates the OEM name into Unicode. The Unicode name is translated into ANSI if an ANSI API is called, then it can be translated back into Unicode with MultiByteToWideChar(). If filenames are being retrieved from a file that is OEM encoded, use CP_OEMCP instead. MORE INFORMATION
When an application calls an ANSI function, the FAT/HPFS file systems will
call AnsiToOem(); however, if an ANSI character does not exist in an OEM
codepage, the filename will not be representable. In these cases,
SetFileApisToOEM() should be called to prevent this problem by setting a
group of the Win32 APIs to use the OEM codepage instead of the ANSI
codepage.
| Other Resources Other Support Sites
CommunityArticle Translations |






Windows Live
Facebook
Twitter
Linkedin
Digg it
Yahoo
Delicious
StumbleUpon
Yammer
Reddit
Technorati
FriendFeed
Email
Back to the top