Simon Ford
/
utf8
Diff: main.cpp
- Revision:
- 0:82feecebc07b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Oct 14 22:25:05 2009 +0000 @@ -0,0 +1,15 @@ +// some examples for printing UTF-8 characters, sford +// - worked on Mac "screen" and PC "putty", but not PC "teraterm" + +#include "mbed.h" + +#pragma import(__use_utf8_ctype) +#include <wchar.h> + +int main() { + printf("How to print UTF-8 chinese characters...\n"); + + printf("Like this: %lc%lc%lc%lc%lc%lc\n",0x4f60, 0x597d, 0x4f60, 0x597d, 0x4f60, 0x597d); + + wprintf(L"Or like this: \u4f60\u597d\u4f60\u597d\u4f60\u597d\n"); +}