| ||||||||
AToUTF8 Methodstatic MCD_STR CMarkup::AToUTF8( MCD_CSTR pszANSI );
There is also a corresponding UTF8ToA method for converting in the other direction. These routines are only compiled in the non- Typically you will use this conversion on string values that come from ANSI Windows functions, not on tag names and values known to be identifiers or numbers. The following example shows values being converted to UTF-8 when put into the document, and converted to ANSI when they are brought out of the document. CString csName; wnd.GetWindowText( csName ); CMarkup xml; xml.AddElem( "A", CMarkup::AToUTF8(csName) ); ... CString csName = CMarkup::UTF8ToA( xml.GetData() ); wnd.SetWindowText( csName ); 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. |