CString::AnsiToOem

voidAnsiToOem();

Remarks

Converts all the characters in this CString object from the ANSI character set to the OEM character set. See the in the C++ Language Reference.

The function is not available if _UNICODE is defined.

Example

// OEM character 252 on most IBM compatible computers in
// Western countries is superscript n, as in 2^n.
// Converting it to the ANSI charset results in a
// normal character 'n', which is the closest possible
// representation.
CString str(252);
str.OemToAnsi();
ASSERT(str[0] == 'n');

// Be aware that in OEM to ANSI conversion the 'n'
// from the previous result can't be converted back to
// a supsercript n because the system doesn't know what
// the character's value truly was.
str.AnsiToOem();
ASSERT(str[0] != 252);
ASSERT(str[0] == 'n');

CString OverviewClass MembersHierarchy Chart

See Also   CString::OemToAnsi