diff options
| author | 2025-10-16 17:25:02 +0200 | |
|---|---|---|
| committer | 2025-10-16 17:25:02 +0200 | |
| commit | 77b13b42643991fc8c2b8942ca167eb7bf156908 (patch) | |
| tree | f65a402832af6111c623af02cf946f7de928e223 /test | |
| parent | c19b3e277399a513c5e3a02d126ba666847566df (diff) | |
wide str and char literals
Diffstat (limited to 'test')
| -rw-r--r-- | test/pp.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -3,8 +3,8 @@ #include "pp.h" #include <stddef.h> #include <stdio.h> -#include <assert.h> -#include <limits.h> +#include <wchar.h> +#include <locale.h> // #define CATl(a) a##bar #define CATr(a) foo##a @@ -39,6 +39,10 @@ main(void) "%s %g\n", str(Foo,5), xstr(Foo), CAT(1.5,e3f) + CAT(7,)-CAT(,1)); printf("join: \"%s\"\n", p); + setlocale(LC_ALL, "en_US.utf8"); + + printf("wide\t L\"%ls\", U+%x\n", L"abc123 猫,€á💫", L'🦋'); + PUT\ S\ ("Output ends here\\ @@ -47,6 +51,5 @@ S\ */ ); - CAT(ret,urn) 0; } |