| ||||||||
UTF8ToA Methodstatic MCD_STR CMarkup::UTF8ToA( MCD_CSTR pszUTF8, int* pnFailed = NULL );
Typically you will use this conversion on string values that will be used in ANSI Windows functions, not on tag names and values known to be identifiers or numbers. Supply the int nFailedChars; CString csName = CMarkup::UTF8ToA( xml.GetData(), &nFailedChars ); if ( nFailedChars ) MessageBox( "The name is not supported in the system code page" ); wnd.SetWindowText( csName ); There is also a corresponding AToUTF8 method for converting in the other direction. These routines are only compiled in the non- These UTF-8 to ANSI conversion functions depend on |
|
Posted December 5, 2004 updated May 14, 2007. Question or comment about this article? ©Copyright 2008 First Objective Software, Inc. All rights reserved. |