Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
simon
Date:
Wed Oct 14 22:25:05 2009 +0000
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 82feecebc07b main.cpp
--- /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");
+}
diff -r 000000000000 -r 82feecebc07b mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Oct 14 22:25:05 2009 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a0336ede94ce