| |||||
Technical Support Support Resources
Product Information | ARMCC: ARE WIDE CHARACTER (UNICODE) STRINGS SUPPORTEDInformation in this article applies to:
QUESTIONDoes MDK-ARM support unicode characters? When I build the following test program:
void wide_ch_test(void) {
wchar_t str1[] = L"Size of message is: ";
wchar_t str2[80];
swprintf(str2,sizeof(str2)/sizeof(wchar_t),L"%s",str1);
gputsw(str2);
}
The line with swprintf function call fails with the warning:
warning: #181-D: argument is incompatible with
corresponding format string conversion
ANSWERWide characters are fully supported. However, you must use the correct format string. Instead of #%s", use #%ls". In your example, change the swprintf function call line to: swprintf (str2, (sizeof(str2)/sizeof(wchar_t)), L"%ls", str1); Last Reviewed: Thursday, August 17, 2006 | ||||
| |||||