summaryrefslogtreecommitdiff
path: root/test_unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'test_unicode.c')
-rw-r--r--test_unicode.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test_unicode.c b/test_unicode.c
new file mode 100644
index 0000000..3abedfa
--- /dev/null
+++ b/test_unicode.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+#include <wchar.h>
+#include <stdlib.h>
+#include <locale.h>
+
+int main(void)
+{
+ setlocale(LC_CTYPE, "");
+ wchar_t white_king = 0x2654;
+ wchar_t black_king = 0x265A;
+ wprintf(L"%lc %lc: %c %c\n", white_king, black_king, 'K', 'k');
+ wprintf(L"WITHOUT VARIABLES: %lc %lc: %c %c\n", 0x2654, 0x265A, 'K', 'k');
+
+ return 0;
+}
+